View Source
Interface ISqlSyntaxProvider
Defines an SqlSyntaxProvider
Assembly: Umbraco.Core.dll
Syntax
public interface ISqlSyntaxProvider
Properties
View Source
AddColumn
Declaration
string AddColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
AliasRegex
Gets a regex matching aliased fields.
Declaration
Regex AliasRegex { get; }
Property Value
Type |
Description |
System.Text.RegularExpressions.Regex |
|
View Source
AlterColumn
Declaration
string AlterColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
AlterSchema
Declaration
string AlterSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ConvertDateToOrderableString
Declaration
string ConvertDateToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ConvertDecimalToOrderableString
Declaration
string ConvertDecimalToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ConvertIntegerToOrderableString
Declaration
string ConvertIntegerToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateConstraint
Declaration
string CreateConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateIndex
Declaration
string CreateIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateSchema
Declaration
string CreateSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateTable
Declaration
string CreateTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DefaultIsolationLevel
Returns the default isolation level for the database
Declaration
IsolationLevel DefaultIsolationLevel { get; }
Property Value
Type |
Description |
System.Data.IsolationLevel |
|
View Source
DeleteConstraint
Declaration
string DeleteConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DeleteData
Declaration
string DeleteData { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DeleteDefaultConstraint
Declaration
string DeleteDefaultConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropColumn
Declaration
string DropColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropIndex
Declaration
string DropIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropSchema
Declaration
string DropSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropTable
Declaration
string DropTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
InsertData
Declaration
string InsertData { get; }
Property Value
Type |
Description |
System.String |
|
View Source
RenameColumn
Declaration
string RenameColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
Declaration
string RenameTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
TruncateTable
Declaration
string TruncateTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
UpdateData
Declaration
string UpdateData { get; }
Property Value
Type |
Description |
System.String |
|
Methods
View Source
DoesTableExist(IDatabase, String)
Declaration
bool DoesTableExist(IDatabase db, string tableName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.String |
tableName |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
EscapeString(String)
Declaration
string EscapeString(string val)
Parameters
Type |
Name |
Description |
System.String |
val |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
string Format(IEnumerable<ColumnDefinition> columns)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ColumnDefinition> |
columns |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
List<string> Format(IEnumerable<ForeignKeyDefinition> foreignKeys)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
View Source
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> |
|
View Source
Declaration
string Format(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
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 |
|
View Source
Declaration
string Format(ForeignKeyDefinition foreignKey)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
string Format(IndexDefinition index)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
string Format(TableDefinition table)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
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 |
|
View Source
Declaration
string FormatDateTime(DateTime date, bool includeTime = true)
Parameters
Type |
Name |
Description |
System.DateTime |
date |
|
System.Boolean |
includeTime |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
string FormatPrimaryKey(TableDefinition table)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
string FormatTableRename(string oldName, string newName)
Parameters
Type |
Name |
Description |
System.String |
oldName |
|
System.String |
newName |
|
Returns
Type |
Description |
System.String |
|
View Source
GetColumnsInSchema(IDatabase)
Declaration
IEnumerable<ColumnInfo> GetColumnsInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ColumnInfo> |
|
View Source
GetConcat(String[])
Declaration
string GetConcat(params string[] args)
Parameters
Type |
Name |
Description |
System.String[] |
args |
|
Returns
Type |
Description |
System.String |
|
View Source
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
|
View Source
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
|
View Source
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
|
View Source
GetIndexType(IndexTypes)
Declaration
string GetIndexType(IndexTypes indexTypes)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedColumnName(String)
Declaration
string GetQuotedColumnName(string columnName)
Parameters
Type |
Name |
Description |
System.String |
columnName |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedName(String)
Declaration
string GetQuotedName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedTableName(String)
Declaration
string GetQuotedTableName(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedValue(String)
Declaration
string GetQuotedValue(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Type |
Description |
System.String |
|
View Source
GetSpecialDbType(SpecialDbTypes)
Declaration
string GetSpecialDbType(SpecialDbTypes dbTypes)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
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 |
|
View Source
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 |
|
View Source
GetTablesInSchema(IDatabase)
Declaration
IEnumerable<string> GetTablesInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
GetWildcardPlaceholder()
Declaration
string GetWildcardPlaceholder()
Returns
Type |
Description |
System.String |
|
View Source
ReadLock(IDatabase, Int32[])
Declaration
void ReadLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
View Source
SelectTop(Sql<ISqlContext>, Int32)
Declaration
Sql<ISqlContext> SelectTop(Sql<ISqlContext> sql, int top)
Parameters
Type |
Name |
Description |
Sql<ISqlContext> |
sql |
|
System.Int32 |
top |
|
Returns
View Source
SupportsClustered()
Declaration
Returns
Type |
Description |
System.Boolean |
|
View Source
SupportsIdentityInsert()
Declaration
bool SupportsIdentityInsert()
Returns
Type |
Description |
System.Boolean |
|
View Source
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.
|
View Source
WriteLock(IDatabase, Int32[])
Declaration
void WriteLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|