C# Class Sharp.Data.Dialect

ファイルを表示 Open project: sharpmigrations/sharpmigrations Class Usage Examples

Public Methods

Method Description
ConvertToNamedParameters ( int indexToStart, object values ) : Sharp.Data.In[]
ConvertToNamedParameters ( object values ) : Sharp.Data.In[]
GetAddColumnSql ( string table, Column column ) : string
GetAddCommentToColumnSql ( string tableName, string columnName, string comment ) : string
GetAddCommentToTableSql ( string tableName, string comment ) : string
GetColumnToSqlWhenCreate ( Column col ) : string
GetColumnValueToSql ( object value ) : string
GetCountSql ( string tableName ) : string
GetCreateIndexSql ( string indexName, string table ) : string
GetCreateTableSqls ( Table table ) : string[]
GetDbType ( string sqlType, int dataPrecision ) : DbType
GetDeleteSql ( string table ) : string
GetDialectName ( ) : string
GetDropColumnSql ( string table, string columnName ) : string[]
GetDropForeignKeySql ( string fkName, string tableName ) : string
GetDropIndexSql ( string indexName, string table ) : string
GetDropPrimaryKeySql ( object tableName, string primaryKeyName ) : string
GetDropTableSqls ( string tableName ) : string[]
GetDropUniqueKeySql ( string uniqueKeyName, string tableName ) : string
GetForeignKeySql ( string fkName, string table, string column, string referencingTable, string referencingColumn, OnDelete onDelete ) : string
GetInsertReturningColumnSql ( string table, string columns, object values, string returningColumnName, string returningParameterName ) : string
GetInsertSql ( string table, string columns, object values ) : string
GetLogicOperator ( LogicOperator op ) : string
GetModifyColumnSql ( string tableName, string columnName, Column columnDefinition ) : string
GetOrderBySql ( ) : string
GetOrderByWord ( OrderByDirection orderByDirection ) : string
GetParameterName ( int order ) : string
GetPrimaryKeySql ( string table, string pkName ) : string
GetRemoveCommentFromColumnSql ( string tableName, string columnName ) : string
GetRemoveCommentFromTableSql ( string tableName ) : string
GetRenameColumnSql ( string tableName, string columnName, string newColumnName ) : string
GetRenameTableSql ( string tableName, string newTableName ) : string
GetSelectSql ( string tables, string columns ) : string
GetTableExistsSql ( string tableName ) : string
GetUniqueKeySql ( string ukName, string table ) : string
GetUpdateSql ( string table, string columns, object values ) : string
GetWhereSql ( Filter filter, int parameterStartIndex ) : string
WrapSelectSqlWithPagination ( string sql, int skipRows, int numberOfRows ) : string

Protected Methods

Method Description
GetColumnCommentsSql ( Table table ) : IEnumerable
GetDbTypeString ( DbType type, int precision ) : string
GetWhereOperatorCompare ( CompareOperator op ) : string

Method Details

ConvertToNamedParameters() public method

public ConvertToNamedParameters ( int indexToStart, object values ) : Sharp.Data.In[]
indexToStart int
values object
return Sharp.Data.In[]

ConvertToNamedParameters() public method

public ConvertToNamedParameters ( object values ) : Sharp.Data.In[]
values object
return Sharp.Data.In[]

GetAddColumnSql() public method

public GetAddColumnSql ( string table, Column column ) : string
table string
column Sharp.Data.Schema.Column
return string

GetAddCommentToColumnSql() public abstract method

public abstract GetAddCommentToColumnSql ( string tableName, string columnName, string comment ) : string
tableName string
columnName string
comment string
return string

GetAddCommentToTableSql() public abstract method

public abstract GetAddCommentToTableSql ( string tableName, string comment ) : string
tableName string
comment string
return string

GetColumnCommentsSql() protected method

protected GetColumnCommentsSql ( Table table ) : IEnumerable
table Sharp.Data.Schema.Table
return IEnumerable

GetColumnToSqlWhenCreate() public abstract method

public abstract GetColumnToSqlWhenCreate ( Column col ) : string
col Sharp.Data.Schema.Column
return string

GetColumnValueToSql() public abstract method

public abstract GetColumnValueToSql ( object value ) : string
value object
return string

GetCountSql() public method

public GetCountSql ( string tableName ) : string
tableName string
return string

GetCreateIndexSql() public method

public GetCreateIndexSql ( string indexName, string table ) : string
indexName string
table string
return string

GetCreateTableSqls() public abstract method

public abstract GetCreateTableSqls ( Table table ) : string[]
table Sharp.Data.Schema.Table
return string[]

GetDbType() public abstract method

public abstract GetDbType ( string sqlType, int dataPrecision ) : DbType
sqlType string
dataPrecision int
return DbType

GetDbTypeString() protected abstract method

protected abstract GetDbTypeString ( DbType type, int precision ) : string
type DbType
precision int
return string

GetDeleteSql() public method

public GetDeleteSql ( string table ) : string
table string
return string

GetDialectName() public method

public GetDialectName ( ) : string
return string

GetDropColumnSql() public method

public GetDropColumnSql ( string table, string columnName ) : string[]
table string
columnName string
return string[]

GetDropForeignKeySql() public method

public GetDropForeignKeySql ( string fkName, string tableName ) : string
fkName string
tableName string
return string

GetDropIndexSql() public method

public GetDropIndexSql ( string indexName, string table ) : string
indexName string
table string
return string

GetDropPrimaryKeySql() public method

public GetDropPrimaryKeySql ( object tableName, string primaryKeyName ) : string
tableName object
primaryKeyName string
return string

GetDropTableSqls() public abstract method

public abstract GetDropTableSqls ( string tableName ) : string[]
tableName string
return string[]

GetDropUniqueKeySql() public abstract method

public abstract GetDropUniqueKeySql ( string uniqueKeyName, string tableName ) : string
uniqueKeyName string
tableName string
return string

GetForeignKeySql() public abstract method

public abstract GetForeignKeySql ( string fkName, string table, string column, string referencingTable, string referencingColumn, OnDelete onDelete ) : string
fkName string
table string
column string
referencingTable string
referencingColumn string
onDelete OnDelete
return string

GetInsertReturningColumnSql() public abstract method

public abstract GetInsertReturningColumnSql ( string table, string columns, object values, string returningColumnName, string returningParameterName ) : string
table string
columns string
values object
returningColumnName string
returningParameterName string
return string

GetInsertSql() public method

public GetInsertSql ( string table, string columns, object values ) : string
table string
columns string
values object
return string

GetLogicOperator() public method

public GetLogicOperator ( LogicOperator op ) : string
op LogicOperator
return string

GetModifyColumnSql() public abstract method

public abstract GetModifyColumnSql ( string tableName, string columnName, Column columnDefinition ) : string
tableName string
columnName string
columnDefinition Sharp.Data.Schema.Column
return string

GetOrderBySql() public method

public GetOrderBySql ( ) : string
return string

GetOrderByWord() public method

public GetOrderByWord ( OrderByDirection orderByDirection ) : string
orderByDirection OrderByDirection
return string

GetParameterName() public method

public GetParameterName ( int order ) : string
order int
return string

GetPrimaryKeySql() public method

public GetPrimaryKeySql ( string table, string pkName ) : string
table string
pkName string
return string

GetRemoveCommentFromColumnSql() public abstract method

public abstract GetRemoveCommentFromColumnSql ( string tableName, string columnName ) : string
tableName string
columnName string
return string

GetRemoveCommentFromTableSql() public abstract method

public abstract GetRemoveCommentFromTableSql ( string tableName ) : string
tableName string
return string

GetRenameColumnSql() public abstract method

public abstract GetRenameColumnSql ( string tableName, string columnName, string newColumnName ) : string
tableName string
columnName string
newColumnName string
return string

GetRenameTableSql() public abstract method

public abstract GetRenameTableSql ( string tableName, string newTableName ) : string
tableName string
newTableName string
return string

GetSelectSql() public method

public GetSelectSql ( string tables, string columns ) : string
tables string
columns string
return string

GetTableExistsSql() public abstract method

public abstract GetTableExistsSql ( string tableName ) : string
tableName string
return string

GetUniqueKeySql() public abstract method

public abstract GetUniqueKeySql ( string ukName, string table ) : string
ukName string
table string
return string

GetUpdateSql() public method

public GetUpdateSql ( string table, string columns, object values ) : string
table string
columns string
values object
return string

GetWhereOperatorCompare() protected method

protected GetWhereOperatorCompare ( CompareOperator op ) : string
op CompareOperator
return string

GetWhereSql() public method

public GetWhereSql ( Filter filter, int parameterStartIndex ) : string
filter Sharp.Data.Filters.Filter
parameterStartIndex int
return string

WrapSelectSqlWithPagination() public abstract method

public abstract WrapSelectSqlWithPagination ( string sql, int skipRows, int numberOfRows ) : string
sql string
skipRows int
numberOfRows int
return string