View Source
Class SqlSyntaxProviderBase<TSyntax>
Represents the Base Sql Syntax provider implementation.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public abstract class SqlSyntaxProviderBase<TSyntax> : ISqlSyntaxProvider2, ISqlSyntaxProvider where TSyntax : ISqlSyntaxProvider
Type Parameters
Constructors
View Source
SqlSyntaxProviderBase()
Declaration
protected SqlSyntaxProviderBase()
Fields
View Source
AutoIncrementDefinition
Declaration
public string AutoIncrementDefinition
Field Value
Type |
Description |
System.String |
|
View Source
BlobColumnDefinition
Declaration
public string BlobColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
BoolColumnDefinition
Declaration
public string BoolColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
DateTimeColumnDefinition
Declaration
public string DateTimeColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
DbTypeMap
Declaration
protected DbTypes DbTypeMap
Field Value
View Source
DecimalColumnDefinition
Declaration
public string DecimalColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
Declaration
public string DecimalColumnDefinitionFormat
Field Value
Type |
Description |
System.String |
|
View Source
DefaultDecimalPrecision
Declaration
public int DefaultDecimalPrecision
Field Value
Type |
Description |
System.Int32 |
|
View Source
DefaultDecimalScale
Declaration
public int DefaultDecimalScale
Field Value
Type |
Description |
System.Int32 |
|
View Source
DefaultStringLength
Declaration
public int DefaultStringLength
Field Value
Type |
Description |
System.Int32 |
|
View Source
Declaration
public string DefaultValueFormat
Field Value
Type |
Description |
System.String |
|
View Source
GuidColumnDefinition
Declaration
public string GuidColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
IntColumnDefinition
Declaration
public string IntColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
LongColumnDefinition
Declaration
public string LongColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
RealColumnDefinition
Declaration
public string RealColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
StringColumnDefinition
Declaration
public string StringColumnDefinition
Field Value
Type |
Description |
System.String |
|
View Source
Declaration
public string StringLengthColumnDefinitionFormat
Field Value
Type |
Description |
System.String |
|
View Source
Declaration
public string StringLengthNonUnicodeColumnDefinitionFormat
Field Value
Type |
Description |
System.String |
|
View Source
Declaration
public string StringLengthUnicodeColumnDefinitionFormat
Field Value
Type |
Description |
System.String |
|
View Source
TimeColumnDefinition
Declaration
public string TimeColumnDefinition
Field Value
Type |
Description |
System.String |
|
Properties
View Source
AddColumn
Declaration
public virtual string AddColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
AliasRegex
Declaration
public Regex AliasRegex { get; }
Property Value
Type |
Description |
System.Text.RegularExpressions.Regex |
|
View Source
AlterColumn
Declaration
public virtual string AlterColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
AlterSchema
Declaration
public virtual string AlterSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ClauseOrder
Declaration
protected IList<Func<ColumnDefinition, string>> ClauseOrder { get; }
Property Value
Type |
Description |
System.Collections.Generic.IList<System.Func<ColumnDefinition, System.String>> |
|
View Source
ConvertDateToOrderableString
Declaration
public virtual string ConvertDateToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ConvertDecimalToOrderableString
Declaration
public virtual string ConvertDecimalToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ConvertIntegerToOrderableString
Declaration
public virtual string ConvertIntegerToOrderableString { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateConstraint
Declaration
public virtual string CreateConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateDefaultConstraint
Declaration
public virtual string CreateDefaultConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateForeignKeyConstraint
Declaration
public virtual string CreateForeignKeyConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateIndex
Declaration
public virtual string CreateIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateSchema
Declaration
public virtual string CreateSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
CreateTable
Declaration
public virtual string CreateTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DefaultIsolationLevel
Declaration
public abstract IsolationLevel DefaultIsolationLevel { get; }
Property Value
Type |
Description |
System.Data.IsolationLevel |
|
View Source
DeleteConstraint
Declaration
public virtual string DeleteConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DeleteData
Declaration
public virtual string DeleteData { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DeleteDefaultConstraint
Declaration
public virtual string DeleteDefaultConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropColumn
Declaration
public virtual string DropColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropIndex
Declaration
public virtual string DropIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropSchema
Declaration
public virtual string DropSchema { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropTable
Declaration
public virtual string DropTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
InsertData
Declaration
public virtual string InsertData { get; }
Property Value
Type |
Description |
System.String |
|
View Source
RenameColumn
Declaration
public virtual string RenameColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string RenameTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
TruncateTable
Declaration
public virtual string TruncateTable { get; }
Property Value
Type |
Description |
System.String |
|
View Source
UpdateData
Declaration
public virtual string UpdateData { get; }
Property Value
Type |
Description |
System.String |
|
Methods
View Source
DoesTableExist(IDatabase, String)
Declaration
public virtual 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
public virtual string EscapeString(string val)
Parameters
Type |
Name |
Description |
System.String |
val |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string Format(IEnumerable<ColumnDefinition> columns)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ColumnDefinition> |
columns |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual List<string> Format(IEnumerable<ForeignKeyDefinition> foreignKeys)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
View Source
Declaration
public virtual 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
public virtual string Format(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual 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
public virtual string Format(ForeignKeyDefinition foreignKey)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string Format(IndexDefinition index)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string Format(TableDefinition table)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected virtual string FormatCascade(string onWhat, Rule rule)
Parameters
Type |
Name |
Description |
System.String |
onWhat |
|
System.Data.Rule |
rule |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual 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
protected virtual string FormatConstraint(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
This is used ONLY if we need to format datetime without using SQL parameters (i.e. during migrations)
Declaration
public virtual 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
protected virtual string FormatDefaultValue(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected abstract string FormatIdentity(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected virtual string FormatNullable(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected virtual string FormatPrimaryKey(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string FormatPrimaryKey(TableDefinition table)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected virtual string FormatString(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected abstract string FormatSystemMethods(SystemMethods systemMethod)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public virtual string FormatTableRename(string oldName, string newName)
Parameters
Type |
Name |
Description |
System.String |
oldName |
|
System.String |
newName |
|
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected virtual string FormatType(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetColumnsInSchema(IDatabase)
Declaration
public virtual IEnumerable<ColumnInfo> GetColumnsInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ColumnInfo> |
|
View Source
GetConcat(String[])
Declaration
public virtual string GetConcat(params string[] args)
Parameters
Type |
Name |
Description |
System.String[] |
args |
|
Returns
Type |
Description |
System.String |
|
View Source
GetConstraintsPerColumn(IDatabase)
Declaration
public virtual 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>> |
|
View Source
GetConstraintsPerTable(IDatabase)
Declaration
public virtual 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>> |
|
View Source
GetDefinedIndexes(IDatabase)
Declaration
public abstract 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>> |
|
View Source
GetIndexType(IndexTypes)
Declaration
public virtual string GetIndexType(IndexTypes indexTypes)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedColumnName(String)
Declaration
public virtual string GetQuotedColumnName(string columnName)
Parameters
Type |
Name |
Description |
System.String |
columnName |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedName(String)
Declaration
public virtual string GetQuotedName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedTableName(String)
Declaration
public virtual string GetQuotedTableName(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Type |
Description |
System.String |
|
View Source
GetQuotedValue(String)
Declaration
public virtual string GetQuotedValue(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Type |
Description |
System.String |
|
View Source
GetSpecialDbType(SpecialDbTypes)
Declaration
public virtual string GetSpecialDbType(SpecialDbTypes dbTypes)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetStringColumnEqualComparison(String, Int32, TextColumnType)
Declaration
public virtual 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
public virtual 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
public virtual IEnumerable<string> GetTablesInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
GetWildcardPlaceholder()
Declaration
public string GetWildcardPlaceholder()
Returns
Type |
Description |
System.String |
|
View Source
InitColumnTypeMap()
Declaration
protected void InitColumnTypeMap()
View Source
ReadLock(IDatabase, Int32[])
Declaration
public abstract void ReadLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
View Source
ReadLock(IDatabase, TimeSpan, Int32)
Declaration
public abstract void ReadLock(IDatabase db, TimeSpan timeout, int lockId)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.TimeSpan |
timeout |
|
System.Int32 |
lockId |
|
View Source
SelectTop(Sql<ISqlContext>, Int32)
Declaration
public abstract Sql<ISqlContext> SelectTop(Sql<ISqlContext> sql, int top)
Parameters
Type |
Name |
Description |
Sql<ISqlContext> |
sql |
|
System.Int32 |
top |
|
Returns
View Source
SupportsClustered()
Declaration
public virtual bool SupportsClustered()
Returns
Type |
Description |
System.Boolean |
|
View Source
SupportsIdentityInsert()
Declaration
public virtual bool SupportsIdentityInsert()
Returns
Type |
Description |
System.Boolean |
|
View Source
TryGetDefaultConstraint(IDatabase, String, String, out String)
Declaration
public abstract bool TryGetDefaultConstraint(IDatabase db, string tableName, string columnName, out string constraintName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.String |
tableName |
|
System.String |
columnName |
|
System.String |
constraintName |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
WriteLock(IDatabase, Int32[])
Declaration
public abstract void WriteLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
View Source
WriteLock(IDatabase, TimeSpan, Int32)
Declaration
public abstract void WriteLock(IDatabase db, TimeSpan timeout, int lockId)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.TimeSpan |
timeout |
|
System.Int32 |
lockId |
|