View Source
Class SqlServerSyntaxProvider
Represents an SqlSyntaxProvider for Sql Server.
Inheritance
System.Object
Assembly: Umbraco.Cms.Persistence.SqlServer.dll
Syntax
public class SqlServerSyntaxProvider : MicrosoftSqlSyntaxProviderBase<SqlServerSyntaxProvider>, ISqlSyntaxProvider
Constructors
View Source
SqlServerSyntaxProvider(IOptions<GlobalSettings>)
Declaration
public SqlServerSyntaxProvider(IOptions<GlobalSettings> globalSettings)
Parameters
Type |
Name |
Description |
IOptions<GlobalSettings> |
globalSettings |
|
View Source
SqlServerSyntaxProvider(IOptions<GlobalSettings>, ILogger<SqlServerSyntaxProvider>)
Declaration
public SqlServerSyntaxProvider(IOptions<GlobalSettings> globalSettings, ILogger<SqlServerSyntaxProvider> logger)
Parameters
Properties
View Source
CreateIndex
Declaration
public override string CreateIndex { get; }
Property Value
Type |
Description |
System.String |
|
View Source
DbProvider
Declaration
public override string DbProvider { 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
ProviderName
Declaration
public override string ProviderName { get; }
Property Value
Type |
Description |
System.String |
|
View Source
RenameColumn
Declaration
public override string RenameColumn { get; }
Property Value
Type |
Description |
System.String |
|
View Source
ServerVersion
Declaration
public SqlServerSyntaxProvider.ServerVersionInfo ServerVersion { get; }
Property Value
Methods
View Source
AppendForUpdateHint(Sql<ISqlContext>)
Declaration
public override Sql<ISqlContext> AppendForUpdateHint(Sql<ISqlContext> sql)
Parameters
Returns
View Source
DoesPrimaryKeyExist(IDatabase, String, String)
Declaration
public override bool DoesPrimaryKeyExist(IDatabase db, string tableName, string primaryKeyName)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
System.String |
tableName |
|
System.String |
primaryKeyName |
|
Returns
Type |
Description |
System.Boolean |
|
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
View Source
GetConstraintsPerColumn(IDatabase)
Declaration
public override IEnumerable<Tuple<string, string, string>> GetConstraintsPerColumn(IDatabase db)
Parameters
Type |
Name |
Description |
IDatabase |
db |
|
Returns
Type |
Description |
IEnumerable<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 |
IEnumerable<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 |
IEnumerable<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 |
IEnumerable<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 |
IEnumerable<System.String> |
|
View Source
GetUpdatedDatabaseType(DatabaseType, String)
Declaration
public override DatabaseType GetUpdatedDatabaseType(DatabaseType current, string connectionString)
Parameters
Type |
Name |
Description |
DatabaseType |
current |
|
System.String |
connectionString |
|
Returns
Type |
Description |
DatabaseType |
|
View Source
InsertForUpdateHint(Sql<ISqlContext>)
Declaration
public override Sql<ISqlContext> InsertForUpdateHint(Sql<ISqlContext> sql)
Parameters
Returns
View Source
LeftJoinWithNestedJoin<TDto>(Sql<ISqlContext>, Func<Sql<ISqlContext>, Sql<ISqlContext>>, String)
Declaration
public override Sql<ISqlContext>.SqlJoinClause<ISqlContext> LeftJoinWithNestedJoin<TDto>(Sql<ISqlContext> sql, Func<Sql<ISqlContext>, Sql<ISqlContext>> nestedJoin, string alias = null)
Parameters
Returns
Type Parameters
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 |
|