Interface ISqlSyntaxProvider
Defines an SqlSyntaxProvider
Assembly: cs.temp.dll.dll
Syntax
public interface ISqlSyntaxProvider
Properties
AddColumn
Declaration
string AddColumn { get; }
Property Value
Type |
Description |
System.String |
|
AliasRegex
Gets a regex matching aliased fields.
Declaration
Regex AliasRegex { get; }
Property Value
AlterColumn
Declaration
string AlterColumn { get; }
Property Value
Type |
Description |
System.String |
|
AlterSchema
Declaration
string AlterSchema { get; }
Property Value
Type |
Description |
System.String |
|
ConvertDateToOrderableString
Declaration
string ConvertDateToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
ConvertDecimalToOrderableString
Declaration
string ConvertDecimalToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
ConvertIntegerToOrderableString
Declaration
string ConvertIntegerToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
CreateConstraint
Declaration
string CreateConstraint { get; }
Property Value
Type |
Description |
System.String |
|
CreateIndex
Declaration
string CreateIndex { get; }
Property Value
Type |
Description |
System.String |
|
CreateSchema
Declaration
string CreateSchema { get; }
Property Value
Type |
Description |
System.String |
|
CreateTable
Declaration
string CreateTable { get; }
Property Value
Type |
Description |
System.String |
|
DbProvider
Declaration
string DbProvider { get; }
Property Value
Type |
Description |
System.String |
|
DefaultIsolationLevel
Returns the default isolation level for the database
Declaration
IsolationLevel DefaultIsolationLevel { get; }
Property Value
Type |
Description |
IsolationLevel |
|
DeleteConstraint
Declaration
string DeleteConstraint { get; }
Property Value
Type |
Description |
System.String |
|
DeleteData
Declaration
string DeleteData { get; }
Property Value
Type |
Description |
System.String |
|
DeleteDefaultConstraint
Declaration
string DeleteDefaultConstraint { get; }
Property Value
Type |
Description |
System.String |
|
DropColumn
Declaration
string DropColumn { get; }
Property Value
Type |
Description |
System.String |
|
DropIndex
Declaration
string DropIndex { get; }
Property Value
Type |
Description |
System.String |
|
DropSchema
Declaration
string DropSchema { get; }
Property Value
Type |
Description |
System.String |
|
DropTable
Declaration
string DropTable { get; }
Property Value
Type |
Description |
System.String |
|
InsertData
Declaration
string InsertData { get; }
Property Value
Type |
Description |
System.String |
|
ProviderName
Declaration
string ProviderName { get; }
Property Value
Type |
Description |
System.String |
|
RenameColumn
Declaration
string RenameColumn { get; }
Property Value
Type |
Description |
System.String |
|
Declaration
string RenameTable { get; }
Property Value
Type |
Description |
System.String |
|
TruncateTable
Declaration
string TruncateTable { get; }
Property Value
Type |
Description |
System.String |
|
UpdateData
Declaration
string UpdateData { get; }
Property Value
Type |
Description |
System.String |
|
Methods
DoesTableExist(IDatabase, String)
Declaration
bool DoesTableExist(IDatabase db, string tableName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.String |
tableName |
|
Returns
Type |
Description |
System.Boolean |
|
EscapeString(String)
Declaration
string EscapeString(string val)
Parameters
Type |
Name |
Description |
System.String |
val |
|
Returns
Type |
Description |
System.String |
|
Declaration
string Format(ColumnDefinition column)
Parameters
Type |
Name |
Description |
ColumnDefinition |
column |
|
Returns
Type |
Description |
System.String |
|
Declaration
string Format(ColumnDefinition column, string tableName, out IEnumerable<string> sqls)
Parameters
Type |
Name |
Description |
ColumnDefinition |
column |
|
System.String |
tableName |
|
System.Collections.Generic.IEnumerable<System.String> |
sqls |
|
Returns
Type |
Description |
System.String |
|
Declaration
string Format(ForeignKeyDefinition foreignKey)
Parameters
Type |
Name |
Description |
ForeignKeyDefinition |
foreignKey |
|
Returns
Type |
Description |
System.String |
|
Declaration
string Format(IndexDefinition index)
Parameters
Type |
Name |
Description |
IndexDefinition |
index |
|
Returns
Type |
Description |
System.String |
|
Declaration
string Format(IEnumerable<ColumnDefinition> columns)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ColumnDefinition> |
columns |
|
Returns
Type |
Description |
System.String |
|
Declaration
List<string> Format(IEnumerable<ForeignKeyDefinition> foreignKeys)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ForeignKeyDefinition> |
foreignKeys |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Declaration
List<string> Format(IEnumerable<IndexDefinition> indexes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<IndexDefinition> |
indexes |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Declaration
string Format(TableDefinition table)
Parameters
Type |
Name |
Description |
TableDefinition |
table |
|
Returns
Type |
Description |
System.String |
|
Declaration
string FormatColumnRename(string tableName, string oldName, string newName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
System.String |
oldName |
|
System.String |
newName |
|
Returns
Type |
Description |
System.String |
|
Declaration
string FormatDateTime(DateTime date, bool includeTime = true)
Parameters
Type |
Name |
Description |
System.DateTime |
date |
|
System.Boolean |
includeTime |
|
Returns
Type |
Description |
System.String |
|
Declaration
string FormatPrimaryKey(TableDefinition table)
Parameters
Type |
Name |
Description |
TableDefinition |
table |
|
Returns
Type |
Description |
System.String |
|
Declaration
string FormatTableRename(string oldName, string newName)
Parameters
Type |
Name |
Description |
System.String |
oldName |
|
System.String |
newName |
|
Returns
Type |
Description |
System.String |
|
GetColumnsInSchema(IDatabase)
Declaration
IEnumerable<ColumnInfo> GetColumnsInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ColumnInfo> |
|
GetConcat(String[])
Declaration
string GetConcat(params string[] args)
Parameters
Type |
Name |
Description |
System.String[] |
args |
|
Returns
Type |
Description |
System.String |
|
GetConstraintsPerColumn(IDatabase)
Returns all constraints defined in the database (Primary keys, foreign keys, unique constraints...) (does not include indexes)
Declaration
IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.String, System.String>> |
A Tuple containing: TableName, ColumnName, ConstraintName
|
GetConstraintsPerTable(IDatabase)
Returns all constraints defined in the database (Primary keys, foreign keys, unique constraints...) (does not include indexes)
Declaration
IEnumerable<Tuple<string, string>> GetConstraintsPerTable(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.String>> |
A Tuple containing: TableName, ConstraintName
|
GetDefinedIndexes(IDatabase)
Returns all defined Indexes in the database excluding primary keys
Declaration
IEnumerable<Tuple<string, string, string, bool>> GetDefinedIndexes(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.String, System.String, System.Boolean>> |
A Tuple containing: TableName, IndexName, ColumnName, IsUnique
|
GetIndexType(IndexTypes)
Declaration
string GetIndexType(IndexTypes indexTypes)
Parameters
Type |
Name |
Description |
IndexTypes |
indexTypes |
|
Returns
Type |
Description |
System.String |
|
GetQuotedColumnName(String)
Declaration
string GetQuotedColumnName(string columnName)
Parameters
Type |
Name |
Description |
System.String |
columnName |
|
Returns
Type |
Description |
System.String |
|
GetQuotedName(String)
Declaration
string GetQuotedName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
GetQuotedTableName(String)
Declaration
string GetQuotedTableName(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Type |
Description |
System.String |
|
GetQuotedValue(String)
Declaration
string GetQuotedValue(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Type |
Description |
System.String |
|
GetSpecialDbType(SpecialDbType)
Declaration
string GetSpecialDbType(SpecialDbType dbType)
Parameters
Type |
Name |
Description |
SpecialDbType |
dbType |
|
Returns
Type |
Description |
System.String |
|
GetStringColumnEqualComparison(String, Int32, TextColumnType)
Declaration
string GetStringColumnEqualComparison(string column, int paramIndex, TextColumnType columnType)
Parameters
Type |
Name |
Description |
System.String |
column |
|
System.Int32 |
paramIndex |
|
TextColumnType |
columnType |
|
Returns
Type |
Description |
System.String |
|
GetStringColumnWildcardComparison(String, Int32, TextColumnType)
Declaration
string GetStringColumnWildcardComparison(string column, int paramIndex, TextColumnType columnType)
Parameters
Type |
Name |
Description |
System.String |
column |
|
System.Int32 |
paramIndex |
|
TextColumnType |
columnType |
|
Returns
Type |
Description |
System.String |
|
GetTablesInSchema(IDatabase)
Declaration
IEnumerable<string> GetTablesInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
GetWildcardPlaceholder()
Declaration
string GetWildcardPlaceholder()
Returns
Type |
Description |
System.String |
|
ReadLock(IDatabase, Int32[])
Declaration
void ReadLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
ReadLock(IDatabase, TimeSpan, Int32)
Declaration
void ReadLock(IDatabase db, TimeSpan timeout, int lockId)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.TimeSpan |
timeout |
|
System.Int32 |
lockId |
|
SelectTop(Sql<ISqlContext>, Int32)
Declaration
Sql<ISqlContext> SelectTop(Sql<ISqlContext> sql, int top)
Parameters
Type |
Name |
Description |
Sql<ISqlContext> |
sql |
|
System.Int32 |
top |
|
Returns
SupportsClustered()
Declaration
Returns
Type |
Description |
System.Boolean |
|
SupportsIdentityInsert()
Declaration
bool SupportsIdentityInsert()
Returns
Type |
Description |
System.Boolean |
|
TryGetDefaultConstraint(IDatabase, String, String, out String)
Tries to gets the name of the default constraint on a column.
Declaration
bool TryGetDefaultConstraint(IDatabase db, string tableName, string columnName, out string constraintName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
The database.
|
System.String |
tableName |
The table name.
|
System.String |
columnName |
The column name.
|
System.String |
constraintName |
The constraint name.
|
Returns
Type |
Description |
System.Boolean |
A value indicating whether a default constraint was found.
|
WriteLock(IDatabase, Int32[])
Declaration
void WriteLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
WriteLock(IDatabase, TimeSpan, Int32)
Declaration
void WriteLock(IDatabase db, TimeSpan timeout, int lockId)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.TimeSpan |
timeout |
|
System.Int32 |
lockId |
|