C# Class nHydrate.Core.SQLGeneration.SQLEmit

Exibir arquivo Open project: nHydrate/nHydrate

Public Methods

Method Description
AppendColumnDefaultCreateSQL ( Column column, bool includeDrop = true ) : string
AppendColumnDefaultRemoveSql ( Column column ) : string
CreateFkName ( Relation relation ) : string
CreateIndexName ( Table table, Column column ) : string
GetDefaultValueConstraintName ( Column column ) : string
GetDetailSQLValue ( Column column ) : string
GetIndexColumns ( Table table, TableIndex index ) : Column>.Dictionary
GetIndexName ( Table table, TableIndex index ) : string
GetSQLCreateAuditTable ( ModelRoot model, Table table ) : string
GetSQLCreateFunction ( Function function, bool isInternal, EFVersionConstants efversion ) : string
GetSQLCreateIndex ( Table table, TableIndex index, bool includeDrop ) : string
GetSQLCreateStoredProc ( CustomStoredProcedure storedProcedure, bool isInternal ) : string
GetSQLCreateTable ( ModelRoot model, Table table ) : string
GetSQLCreateTableSecurityFunction ( Table table, ModelRoot model, bool isInternal ) : string
GetSQLDropIndex ( Table table, TableIndex index ) : string
GetSqlAddColumn ( Column column ) : string
GetSqlAddColumn ( Column column, bool useComment ) : string
GetSqlAddFK ( Relation relation ) : string
GetSqlCreateAuditPK ( Table table ) : string
GetSqlCreateColumnDefault ( ModelRoot model, Column column ) : string
GetSqlCreatePK ( Table table ) : string
GetSqlCreateTenantColumn ( ModelRoot model, Table table ) : string
GetSqlCreateView ( CustomView view, bool isInternal ) : string
GetSqlDropAuditPK ( Table table ) : string
GetSqlDropColumn ( ModelRoot model, Column column ) : string
GetSqlDropColumnDefault ( Column column, bool upgradeScript = false ) : string
GetSqlDropPK ( Table table ) : string
GetSqlDropTable ( Table t ) : string
GetSqlInsertStaticData ( Table table ) : string
GetSqlModifyColumn ( Column oldColumn, Column newColumn ) : string
GetSqlRemoveFK ( Relation relation ) : string
GetSqlRenameColumn ( Column oldColumn, Column newColumn ) : string
GetSqlRenameColumn ( string table, string oldColumn, string newColumn ) : string
GetSqlRenameTable ( Table oldTable, Table newTable ) : string
GetSqlTenantIndex ( ModelRoot model, Table table ) : string
GetSqlTenantView ( ModelRoot model, Table table, StringBuilder grantSB ) : string
GetSqlUpdateStaticData ( Table table ) : string

Private Methods

Method Description
AppendChildTableColumns ( Relation relation ) : string
AppendColumnDefinition ( Column column, bool allowDefault, bool allowIdentity ) : string
AppendColumnDefinition ( Column column, bool allowDefault, bool allowIdentity, bool forceNull ) : string
AppendColumnDefinition ( Column column, bool allowDefault, bool allowIdentity, bool forceNull, bool allowFormula ) : string
AppendColumnDefinition ( Column column, bool allowDefault, bool allowIdentity, bool forceNull, bool allowFormula, bool allowComputed ) : string
AppendCreateAudit ( ModelRoot model, Table table, StringBuilder sb ) : void
AppendModifiedAudit ( ModelRoot model, Table table, StringBuilder sb ) : void
AppendParentTableColumns ( Relation relation, Table table ) : string
AppendTenantField ( ModelRoot model, Table table, StringBuilder sb ) : void
AppendTimestamp ( ModelRoot model, Table table, StringBuilder sb ) : void
BuildFunctionParameterList ( IEnumerable parameterList ) : string
BuildStoredProcParameterList ( CustomStoredProcedure storedProcedure ) : string
GetDefaultValue ( string modelDefault ) : string
GetDefaultValueClause ( Column column ) : string
GetFieldNames ( Relation relation ) : string
GetSQLCreateFunctionSPWrapper ( Function function ) : string

Method Details

AppendColumnDefaultCreateSQL() public static method

public static AppendColumnDefaultCreateSQL ( Column column, bool includeDrop = true ) : string
column nHydrate.Generator.Models.Column
includeDrop bool
return string

AppendColumnDefaultRemoveSql() public static method

public static AppendColumnDefaultRemoveSql ( Column column ) : string
column nHydrate.Generator.Models.Column
return string

CreateFkName() public static method

public static CreateFkName ( Relation relation ) : string
relation nHydrate.Generator.Models.Relation
return string

CreateIndexName() public static method

public static CreateIndexName ( Table table, Column column ) : string
table nHydrate.Generator.Models.Table
column nHydrate.Generator.Models.Column
return string

GetDefaultValueConstraintName() public static method

public static GetDefaultValueConstraintName ( Column column ) : string
column nHydrate.Generator.Models.Column
return string

GetDetailSQLValue() public static method

public static GetDetailSQLValue ( Column column ) : string
column nHydrate.Generator.Models.Column
return string

GetIndexColumns() public static method

public static GetIndexColumns ( Table table, TableIndex index ) : Column>.Dictionary
table nHydrate.Generator.Models.Table
index nHydrate.Generator.Models.TableIndex
return Column>.Dictionary

GetIndexName() public static method

public static GetIndexName ( Table table, TableIndex index ) : string
table nHydrate.Generator.Models.Table
index nHydrate.Generator.Models.TableIndex
return string

GetSQLCreateAuditTable() public static method

public static GetSQLCreateAuditTable ( ModelRoot model, Table table ) : string
model nHydrate.Generator.Models.ModelRoot
table nHydrate.Generator.Models.Table
return string

GetSQLCreateFunction() public static method

public static GetSQLCreateFunction ( Function function, bool isInternal, EFVersionConstants efversion ) : string
function Function
isInternal bool
efversion EFVersionConstants
return string

GetSQLCreateIndex() public static method

public static GetSQLCreateIndex ( Table table, TableIndex index, bool includeDrop ) : string
table nHydrate.Generator.Models.Table
index nHydrate.Generator.Models.TableIndex
includeDrop bool
return string

GetSQLCreateStoredProc() public static method

public static GetSQLCreateStoredProc ( CustomStoredProcedure storedProcedure, bool isInternal ) : string
storedProcedure nHydrate.Generator.Models.CustomStoredProcedure
isInternal bool
return string

GetSQLCreateTable() public static method

public static GetSQLCreateTable ( ModelRoot model, Table table ) : string
model nHydrate.Generator.Models.ModelRoot
table nHydrate.Generator.Models.Table
return string

GetSQLCreateTableSecurityFunction() public static method

public static GetSQLCreateTableSecurityFunction ( Table table, ModelRoot model, bool isInternal ) : string
table nHydrate.Generator.Models.Table
model nHydrate.Generator.Models.ModelRoot
isInternal bool
return string

GetSQLDropIndex() public static method

public static GetSQLDropIndex ( Table table, TableIndex index ) : string
table nHydrate.Generator.Models.Table
index nHydrate.Generator.Models.TableIndex
return string

GetSqlAddColumn() public static method

public static GetSqlAddColumn ( Column column ) : string
column nHydrate.Generator.Models.Column
return string

GetSqlAddColumn() public static method

public static GetSqlAddColumn ( Column column, bool useComment ) : string
column nHydrate.Generator.Models.Column
useComment bool
return string

GetSqlAddFK() public static method

public static GetSqlAddFK ( Relation relation ) : string
relation nHydrate.Generator.Models.Relation
return string

GetSqlCreateAuditPK() public static method

public static GetSqlCreateAuditPK ( Table table ) : string
table nHydrate.Generator.Models.Table
return string

GetSqlCreateColumnDefault() public static method

public static GetSqlCreateColumnDefault ( ModelRoot model, Column column ) : string
model nHydrate.Generator.Models.ModelRoot
column nHydrate.Generator.Models.Column
return string

GetSqlCreatePK() public static method

public static GetSqlCreatePK ( Table table ) : string
table nHydrate.Generator.Models.Table
return string

GetSqlCreateTenantColumn() public static method

public static GetSqlCreateTenantColumn ( ModelRoot model, Table table ) : string
model nHydrate.Generator.Models.ModelRoot
table nHydrate.Generator.Models.Table
return string

GetSqlCreateView() public static method

public static GetSqlCreateView ( CustomView view, bool isInternal ) : string
view nHydrate.Generator.Models.CustomView
isInternal bool
return string

GetSqlDropAuditPK() public static method

public static GetSqlDropAuditPK ( Table table ) : string
table nHydrate.Generator.Models.Table
return string

GetSqlDropColumn() public static method

public static GetSqlDropColumn ( ModelRoot model, Column column ) : string
model nHydrate.Generator.Models.ModelRoot
column nHydrate.Generator.Models.Column
return string

GetSqlDropColumnDefault() public static method

public static GetSqlDropColumnDefault ( Column column, bool upgradeScript = false ) : string
column nHydrate.Generator.Models.Column
upgradeScript bool
return string

GetSqlDropPK() public static method

public static GetSqlDropPK ( Table table ) : string
table nHydrate.Generator.Models.Table
return string

GetSqlDropTable() public static method

public static GetSqlDropTable ( Table t ) : string
t nHydrate.Generator.Models.Table
return string

GetSqlInsertStaticData() public static method

public static GetSqlInsertStaticData ( Table table ) : string
table nHydrate.Generator.Models.Table
return string

GetSqlModifyColumn() public static method

public static GetSqlModifyColumn ( Column oldColumn, Column newColumn ) : string
oldColumn nHydrate.Generator.Models.Column
newColumn nHydrate.Generator.Models.Column
return string

GetSqlRemoveFK() public static method

public static GetSqlRemoveFK ( Relation relation ) : string
relation nHydrate.Generator.Models.Relation
return string

GetSqlRenameColumn() public static method

public static GetSqlRenameColumn ( Column oldColumn, Column newColumn ) : string
oldColumn nHydrate.Generator.Models.Column
newColumn nHydrate.Generator.Models.Column
return string

GetSqlRenameColumn() public static method

public static GetSqlRenameColumn ( string table, string oldColumn, string newColumn ) : string
table string
oldColumn string
newColumn string
return string

GetSqlRenameTable() public static method

public static GetSqlRenameTable ( Table oldTable, Table newTable ) : string
oldTable nHydrate.Generator.Models.Table
newTable nHydrate.Generator.Models.Table
return string

GetSqlTenantIndex() public static method

public static GetSqlTenantIndex ( ModelRoot model, Table table ) : string
model nHydrate.Generator.Models.ModelRoot
table nHydrate.Generator.Models.Table
return string

GetSqlTenantView() public static method

public static GetSqlTenantView ( ModelRoot model, Table table, StringBuilder grantSB ) : string
model nHydrate.Generator.Models.ModelRoot
table nHydrate.Generator.Models.Table
grantSB StringBuilder
return string

GetSqlUpdateStaticData() public static method

public static GetSqlUpdateStaticData ( Table table ) : string
table nHydrate.Generator.Models.Table
return string