View Source
Class SqlServerSyntaxProvider
Represents an SqlSyntaxProvider for Sql Server.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class SqlServerSyntaxProvider : MicrosoftSqlSyntaxProviderBase<SqlServerSyntaxProvider>, ISqlSyntaxProvider2, ISqlSyntaxProvider
Properties
View Source
CreateIndex
Declaration
public override string CreateIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DefaultIsolationLevel
Declaration
public override IsolationLevel DefaultIsolationLevel { get; }
Property Value
Type |
Description |
System.Data.IsolationLevel |
|
View Source
DeleteDefaultConstraint
Declaration
public override string DeleteDefaultConstraint { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DropIndex
Declaration
public override string DropIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
RenameColumn
Declaration
public override string RenameColumn { get; }
Property Value
Type |
Description |
System.String |
|
Methods
View Source
DoesTableExist(IDatabase, String)
Declaration
public override bool DoesTableExist(IDatabase db, string tableName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.String |
tableName |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Declaration
public override string Format(IndexDefinition index)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public override 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 override string FormatIdentity(ColumnDefinition column)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
protected override string FormatSystemMethods(SystemMethods systemMethod)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
Declaration
public override 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
public override IEnumerable<ColumnInfo> GetColumnsInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ColumnInfo> |
|
View Source
GetConstraintsPerColumn(IDatabase)
Declaration
public override 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 override 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
GetDefaultConstraintsPerColumn(IDatabase)
SQL Server stores default values assigned to columns as constraints, it also stores them with named values, this is the only
server type that does this, therefore this method doesn't exist on any other syntax provider
Declaration
public IEnumerable<Tuple<string, string, string, string>> GetDefaultConstraintsPerColumn(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.String, System.String, System.String>> |
|
View Source
GetDefinedIndexes(IDatabase)
Declaration
public override 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
GetTablesInSchema(IDatabase)
Declaration
public override IEnumerable<string> GetTablesInSchema(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
ReadLock(IDatabase, Int32[])
Declaration
public override void ReadLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
View Source
ReadLock(IDatabase, TimeSpan, Int32)
Declaration
public override 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 override Sql<ISqlContext> SelectTop(Sql<ISqlContext> sql, int top)
Parameters
Type |
Name |
Description |
Sql<ISqlContext> |
sql |
|
System.Int32 |
top |
|
Returns
View Source
TryGetDefaultConstraint(IDatabase, String, String, out String)
Declaration
public override 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 override void WriteLock(IDatabase db, params int[] lockIds)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.Int32[] |
lockIds |
|
View Source
WriteLock(IDatabase, TimeSpan, Int32)
Declaration
public override void WriteLock(IDatabase db, TimeSpan timeout, int lockId)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.TimeSpan |
timeout |
|
System.Int32 |
lockId |
|