C# Class Signum.Engine.SqlBuilder

Datei anzeigen Open project: signumsoftware/framework

Public Properties

Property Type Description
SystemSchemas List

Public Methods

Method Description
AddDefaultConstraint ( ObjectName tableName, string columnName, string definition ) : SqlPreCommandSimple
AlterSchema ( ObjectName oldName, SchemaName schemaName ) : SqlPreCommandSimple
AlterTableAddColumn ( ITable table, IColumn column ) : SqlPreCommand
AlterTableAddConstraintForeignKey ( ITable table, string fieldName, ITable foreignTable ) : SqlPreCommand
AlterTableAddDefaultConstraint ( ObjectName tableName, string column, string constraintName, string definition ) : SqlPreCommand
AlterTableAlterColumn ( ITable table, IColumn column ) : SqlPreCommand
AlterTableDropColumn ( ITable table, string columnName ) : SqlPreCommand
AlterTableDropConstraint ( ObjectName tableName, ObjectName constraintName ) : SqlPreCommand
AlterTableForeignKeys ( ITable t ) : SqlPreCommand
CreateAllIndices ( ITable t ) : SqlPreCommand
CreateColumn ( IColumn c ) : string
CreateColumn ( string name, SqlDbType type, string udtTypeName, int size, int scale, bool nullable, bool identity, string @default ) : string
CreateIndex ( Index index ) : SqlPreCommand
CreateSchema ( SchemaName schemaName ) : SqlPreCommand
CreateTableSql ( ITable t ) : SqlPreCommandSimple
DisableForeignKey ( ObjectName tableName, string foreignKey ) : SqlPreCommandSimple
DisableIndex ( ObjectName tableName, string indexName ) : SqlPreCommandSimple
DropDefaultConstraint ( ObjectName tableName, string columnName ) : SqlPreCommandSimple
DropIndex ( ObjectName tableName, DiffIndex index ) : SqlPreCommand
DropIndex ( ObjectName objectName, string indexName ) : SqlPreCommand
DropIndex ( UniqueIndex ix ) : SqlPreCommand
DropPrimaryKeyConstraint ( ObjectName tableName ) : SqlPreCommandSimple
DropSchema ( SchemaName schemaName ) : SqlPreCommand
DropTable ( ObjectName tableName ) : SqlPreCommand
DropView ( ObjectName viewName ) : SqlPreCommand
EnableForeignKey ( ObjectName tableName, string foreignKey ) : SqlPreCommandSimple
EnableIndex ( ObjectName tableName, string indexName ) : SqlPreCommandSimple
ForeignKeyName ( string table, string fieldName ) : string
GetSizeScale ( int size, int scale ) : string
IsDate ( SqlDbType sqlDbType ) : bool
IsNumber ( SqlDbType sqlDbType ) : bool
IsString ( SqlDbType sqlDbType ) : bool
MakeSnapshotIsolationDefault ( string databaseName, bool value ) : SqlPreCommandSimple
MoveRows ( ObjectName oldTable, ObjectName newTable, IEnumerable columnNames ) : SqlPreCommand
ReCreateFreeIndex ( ITable table, DiffIndex index, string oldTable, string>.Dictionary tableReplacements ) : SqlPreCommand
RenameColumn ( ITable table, string oldName, string newName ) : SqlPreCommand
RenameForeignKey ( ObjectName foreignKeyName, string newName ) : SqlPreCommand
RenameIndex ( ITable table, string oldName, string newName ) : SqlPreCommand
RenameOrMove ( DiffTable oldTable, ITable newTable ) : SqlPreCommand
RenameTable ( ObjectName oldName, string newName ) : SqlPreCommand
SP_RENAME ( DatabaseName database, string oldName, string newName, string objectType ) : SqlPreCommandSimple
SelectRowCount ( ) : SqlPreCommandSimple
SetIdentityInsert ( ObjectName tableName, bool value ) : SqlPreCommandSimple
SetMultiUser ( string databaseName ) : SqlPreCommandSimple
SetSingleUser ( string databaseName ) : SqlPreCommandSimple
SetSnapshotIsolation ( string databaseName, bool value ) : SqlPreCommandSimple

Private Methods

Method Description
DropStatistics ( string tn, List list ) : SqlPreCommand
DropViewIndex ( ObjectName viewName, string index ) : SqlPreCommand
Quote ( SqlDbType type, string @default ) : string
UpdateTrim ( ITable tab, IColumn tabCol ) : SqlPreCommand

Method Details

AddDefaultConstraint() public static method

public static AddDefaultConstraint ( ObjectName tableName, string columnName, string definition ) : SqlPreCommandSimple
tableName ObjectName
columnName string
definition string
return SqlPreCommandSimple

AlterSchema() public static method

public static AlterSchema ( ObjectName oldName, SchemaName schemaName ) : SqlPreCommandSimple
oldName ObjectName
schemaName SchemaName
return SqlPreCommandSimple

AlterTableAddColumn() public static method

public static AlterTableAddColumn ( ITable table, IColumn column ) : SqlPreCommand
table ITable
column IColumn
return SqlPreCommand

AlterTableAddConstraintForeignKey() public static method

public static AlterTableAddConstraintForeignKey ( ITable table, string fieldName, ITable foreignTable ) : SqlPreCommand
table ITable
fieldName string
foreignTable ITable
return SqlPreCommand

AlterTableAddDefaultConstraint() public static method

public static AlterTableAddDefaultConstraint ( ObjectName tableName, string column, string constraintName, string definition ) : SqlPreCommand
tableName ObjectName
column string
constraintName string
definition string
return SqlPreCommand

AlterTableAlterColumn() public static method

public static AlterTableAlterColumn ( ITable table, IColumn column ) : SqlPreCommand
table ITable
column IColumn
return SqlPreCommand

AlterTableDropColumn() public static method

public static AlterTableDropColumn ( ITable table, string columnName ) : SqlPreCommand
table ITable
columnName string
return SqlPreCommand

AlterTableDropConstraint() public static method

public static AlterTableDropConstraint ( ObjectName tableName, ObjectName constraintName ) : SqlPreCommand
tableName ObjectName
constraintName ObjectName
return SqlPreCommand

AlterTableForeignKeys() public static method

public static AlterTableForeignKeys ( ITable t ) : SqlPreCommand
t ITable
return SqlPreCommand

CreateAllIndices() public static method

public static CreateAllIndices ( ITable t ) : SqlPreCommand
t ITable
return SqlPreCommand

CreateColumn() public static method

public static CreateColumn ( IColumn c ) : string
c IColumn
return string

CreateColumn() public static method

public static CreateColumn ( string name, SqlDbType type, string udtTypeName, int size, int scale, bool nullable, bool identity, string @default ) : string
name string
type SqlDbType
udtTypeName string
size int
scale int
nullable bool
identity bool
@default string
return string

CreateIndex() public static method

public static CreateIndex ( Index index ) : SqlPreCommand
index Signum.Engine.Maps.Index
return SqlPreCommand

CreateSchema() public static method

public static CreateSchema ( SchemaName schemaName ) : SqlPreCommand
schemaName SchemaName
return SqlPreCommand

CreateTableSql() public static method

public static CreateTableSql ( ITable t ) : SqlPreCommandSimple
t ITable
return SqlPreCommandSimple

DisableForeignKey() public static method

public static DisableForeignKey ( ObjectName tableName, string foreignKey ) : SqlPreCommandSimple
tableName ObjectName
foreignKey string
return SqlPreCommandSimple

DisableIndex() public static method

public static DisableIndex ( ObjectName tableName, string indexName ) : SqlPreCommandSimple
tableName ObjectName
indexName string
return SqlPreCommandSimple

DropDefaultConstraint() public static method

public static DropDefaultConstraint ( ObjectName tableName, string columnName ) : SqlPreCommandSimple
tableName ObjectName
columnName string
return SqlPreCommandSimple

DropIndex() public static method

public static DropIndex ( ObjectName tableName, DiffIndex index ) : SqlPreCommand
tableName ObjectName
index DiffIndex
return SqlPreCommand

DropIndex() public static method

public static DropIndex ( ObjectName objectName, string indexName ) : SqlPreCommand
objectName ObjectName
indexName string
return SqlPreCommand

DropIndex() public static method

public static DropIndex ( UniqueIndex ix ) : SqlPreCommand
ix Signum.Engine.Maps.UniqueIndex
return SqlPreCommand

DropPrimaryKeyConstraint() public static method

public static DropPrimaryKeyConstraint ( ObjectName tableName ) : SqlPreCommandSimple
tableName ObjectName
return SqlPreCommandSimple

DropSchema() public static method

public static DropSchema ( SchemaName schemaName ) : SqlPreCommand
schemaName SchemaName
return SqlPreCommand

DropTable() public static method

public static DropTable ( ObjectName tableName ) : SqlPreCommand
tableName ObjectName
return SqlPreCommand

DropView() public static method

public static DropView ( ObjectName viewName ) : SqlPreCommand
viewName ObjectName
return SqlPreCommand

EnableForeignKey() public static method

public static EnableForeignKey ( ObjectName tableName, string foreignKey ) : SqlPreCommandSimple
tableName ObjectName
foreignKey string
return SqlPreCommandSimple

EnableIndex() public static method

public static EnableIndex ( ObjectName tableName, string indexName ) : SqlPreCommandSimple
tableName ObjectName
indexName string
return SqlPreCommandSimple

ForeignKeyName() public static method

public static ForeignKeyName ( string table, string fieldName ) : string
table string
fieldName string
return string

GetSizeScale() public static method

public static GetSizeScale ( int size, int scale ) : string
size int
scale int
return string

IsDate() public static method

public static IsDate ( SqlDbType sqlDbType ) : bool
sqlDbType SqlDbType
return bool

IsNumber() public static method

public static IsNumber ( SqlDbType sqlDbType ) : bool
sqlDbType SqlDbType
return bool

IsString() public static method

public static IsString ( SqlDbType sqlDbType ) : bool
sqlDbType SqlDbType
return bool

MakeSnapshotIsolationDefault() public static method

public static MakeSnapshotIsolationDefault ( string databaseName, bool value ) : SqlPreCommandSimple
databaseName string
value bool
return SqlPreCommandSimple

MoveRows() public static method

public static MoveRows ( ObjectName oldTable, ObjectName newTable, IEnumerable columnNames ) : SqlPreCommand
oldTable ObjectName
newTable ObjectName
columnNames IEnumerable
return SqlPreCommand

ReCreateFreeIndex() public static method

public static ReCreateFreeIndex ( ITable table, DiffIndex index, string oldTable, string>.Dictionary tableReplacements ) : SqlPreCommand
table ITable
index DiffIndex
oldTable string
tableReplacements string>.Dictionary
return SqlPreCommand

RenameColumn() public static method

public static RenameColumn ( ITable table, string oldName, string newName ) : SqlPreCommand
table ITable
oldName string
newName string
return SqlPreCommand

RenameForeignKey() public static method

public static RenameForeignKey ( ObjectName foreignKeyName, string newName ) : SqlPreCommand
foreignKeyName ObjectName
newName string
return SqlPreCommand

RenameIndex() public static method

public static RenameIndex ( ITable table, string oldName, string newName ) : SqlPreCommand
table ITable
oldName string
newName string
return SqlPreCommand

RenameOrMove() public static method

public static RenameOrMove ( DiffTable oldTable, ITable newTable ) : SqlPreCommand
oldTable DiffTable
newTable ITable
return SqlPreCommand

RenameTable() public static method

public static RenameTable ( ObjectName oldName, string newName ) : SqlPreCommand
oldName ObjectName
newName string
return SqlPreCommand

SP_RENAME() public static method

public static SP_RENAME ( DatabaseName database, string oldName, string newName, string objectType ) : SqlPreCommandSimple
database DatabaseName
oldName string
newName string
objectType string
return SqlPreCommandSimple

SelectRowCount() public static method

public static SelectRowCount ( ) : SqlPreCommandSimple
return SqlPreCommandSimple

SetIdentityInsert() public static method

public static SetIdentityInsert ( ObjectName tableName, bool value ) : SqlPreCommandSimple
tableName ObjectName
value bool
return SqlPreCommandSimple

SetMultiUser() public static method

public static SetMultiUser ( string databaseName ) : SqlPreCommandSimple
databaseName string
return SqlPreCommandSimple

SetSingleUser() public static method

public static SetSingleUser ( string databaseName ) : SqlPreCommandSimple
databaseName string
return SqlPreCommandSimple

SetSnapshotIsolation() public static method

public static SetSnapshotIsolation ( string databaseName, bool value ) : SqlPreCommandSimple
databaseName string
value bool
return SqlPreCommandSimple

Property Details

SystemSchemas public_oe static_oe property

public static List SystemSchemas
return List