C# Class Rsdn.Janus.Mssql.MssqlSchemaDriver

Inheritance: DBSchemaDriverBase
Show file Open project: rsdn/janus Class Usage Examples

Public Methods

Method Description
BeginTableLoad ( IDbConnection connection, TableSchema table ) : void
CreateConnection ( string connStr ) : IDbConnection
CreateDatabase ( string connectionString ) : void
EndTableLoad ( IDbConnection connection, TableSchema table ) : void
LoadExistingSchema ( string connStr ) : DBSchema

Создать схему метаданных из исходной базы

Protected Methods

Method Description
AfterSchemaComparision ( DBSchema existingSchema, DBSchema targetSchema ) : void
CheckIndexTypeForRecreate ( IndexSchema eIndex ) : bool
CheckKeyTypeForRecreate ( KeySchema eKey ) : bool
DbscCopyPrepare ( DBSchema schema ) : DBSchema
ExecuteDdlCommands ( IEnumerable commands, string connStr ) : void
MakeDdlIndexCreate ( IndexSchema index, TableSchema table ) : string
ParseColumn ( TableColumnSchema column ) : string
ParseColumnAlter ( TableColumnSchema mColumn, TableColumnSchema eColumn ) : string
WriteDdlCommands ( TextWriter wr, IEnumerable commands ) : void

Private Methods

Method Description
ConnectToMaster ( string connectionString, string &dbName ) : SqlConnection
TableHasIdentityColumns ( TableSchema table ) : bool

Method Details

AfterSchemaComparision() protected method

protected AfterSchemaComparision ( DBSchema existingSchema, DBSchema targetSchema ) : void
existingSchema DBSchema
targetSchema DBSchema
return void

BeginTableLoad() public method

public BeginTableLoad ( IDbConnection connection, TableSchema table ) : void
connection IDbConnection
table TableSchema
return void

CheckIndexTypeForRecreate() protected method

protected CheckIndexTypeForRecreate ( IndexSchema eIndex ) : bool
eIndex IndexSchema
return bool

CheckKeyTypeForRecreate() protected method

protected CheckKeyTypeForRecreate ( KeySchema eKey ) : bool
eKey KeySchema
return bool

CreateConnection() public method

public CreateConnection ( string connStr ) : IDbConnection
connStr string
return IDbConnection

CreateDatabase() public method

public CreateDatabase ( string connectionString ) : void
connectionString string
return void

DbscCopyPrepare() protected method

protected DbscCopyPrepare ( DBSchema schema ) : DBSchema
schema DBSchema
return DBSchema

EndTableLoad() public method

public EndTableLoad ( IDbConnection connection, TableSchema table ) : void
connection IDbConnection
table TableSchema
return void

ExecuteDdlCommands() protected method

protected ExecuteDdlCommands ( IEnumerable commands, string connStr ) : void
commands IEnumerable
connStr string
return void

LoadExistingSchema() public method

Создать схему метаданных из исходной базы
public LoadExistingSchema ( string connStr ) : DBSchema
connStr string
return DBSchema

MakeDdlIndexCreate() protected method

protected MakeDdlIndexCreate ( IndexSchema index, TableSchema table ) : string
index IndexSchema
table TableSchema
return string

ParseColumn() protected method

protected ParseColumn ( TableColumnSchema column ) : string
column TableColumnSchema
return string

ParseColumnAlter() protected method

protected ParseColumnAlter ( TableColumnSchema mColumn, TableColumnSchema eColumn ) : string
mColumn TableColumnSchema
eColumn TableColumnSchema
return string

WriteDdlCommands() protected method

protected WriteDdlCommands ( TextWriter wr, IEnumerable commands ) : void
wr System.IO.TextWriter
commands IEnumerable
return void