C# Класс DBreeze.Scheme

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DeleteTable ( string userTableName ) : void

Deletes user table

Dispose ( ) : void
GetTablePathFromTableName ( string userTableName ) : string

Returns physical path to the table file, if table doesn't exists in the Scheme returns String.Empty

GetUserTableNamesStartingWith ( string mask ) : List

Returns List of user tables starting from specified mask. If mask is String.Empty returns all user tables

IfUserTableExists ( string userTableName ) : bool

Returns if user table exists

RenameTable ( string oldUserTableName, string newUserTableName ) : void

Renames user table, if it existed.

Safe, will make operation only when other threads stop to work with the oldTable

Scheme ( DBreezeEngine DBreezeEngine ) : System

Приватные методы

Метод Описание
CheckAlternativeTableLocationsIntersections ( string userTableName, string &alternativePath ) : bool

Checks if in configuration was supplied alternative path for table location. Returns true if intersection was found. Alternative Path equals to String.Empty - locate in Memory

CloseTables ( ulong?>.Dictionary closeOpenTables ) : void

Called by Transaction, when it's time to be Disposed and close tables. Tables will be closed only in case of other threads don't use it.

DeleteAllReleatedTableFiles ( string fullTableFilePath ) : void

Used by GetTableFor Write, if table is newly created and we have such file name

GetPhysicalPathToTheUserTable ( string userTableName ) : string

ONLY FOR INTERNAL NEEDS, lock must be handeled by outer procedure. Users must use GetTablePathFromTableName. Transactions Journal after start will try to delete RollbackFiles of the finished transactions. For this it needs to know exact pathes. For now all tables stored in one folder. Later we will have extra config file which lets to reside some of tables in the other folders. This function is an access globalizer to physical file locations by userTableName. !!!!TRAnJRNL, WHEN RESTORES ROLLBACK, MUST REFER TO Scheme trie settings in the future, FOR NOW DEFAULT

GetTable ( string userTableName ) : LTrie

Returns table for READ, WRITE FUNC

GetUserTableNameAsByte ( string tableName ) : byte[]

Adds static prefix to all user table names, to make selection of tables for different purposes easier with StartsWith function

GetUserTableNameAsString ( string tableName ) : string
OpenSchema ( ) : void
ReadUserLastFileNumber ( ) : void
RenameTableInternal ( string oldUserTableName, string newUserTableName ) : bool

Renames user table, if it existed.

If there are threads which are working with this table, rename will not be finished and will return false

Описание методов

DeleteTable() публичный Метод

Deletes user table
public DeleteTable ( string userTableName ) : void
userTableName string
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetTablePathFromTableName() публичный Метод

Returns physical path to the table file, if table doesn't exists in the Scheme returns String.Empty
public GetTablePathFromTableName ( string userTableName ) : string
userTableName string
Результат string

GetUserTableNamesStartingWith() публичный Метод

Returns List of user tables starting from specified mask. If mask is String.Empty returns all user tables
public GetUserTableNamesStartingWith ( string mask ) : List
mask string
Результат List

IfUserTableExists() публичный Метод

Returns if user table exists
public IfUserTableExists ( string userTableName ) : bool
userTableName string
Результат bool

RenameTable() публичный Метод

Renames user table, if it existed.

Safe, will make operation only when other threads stop to work with the oldTable

public RenameTable ( string oldUserTableName, string newUserTableName ) : void
oldUserTableName string
newUserTableName string
Результат void

Scheme() публичный Метод

public Scheme ( DBreezeEngine DBreezeEngine ) : System
DBreezeEngine DBreezeEngine
Результат System