Skip to main content

SqlServerOrmLiteDialectProvider

Assembly: ServiceStack.OrmLite.SqlServer.Data.dll
View Source
Declaration
public class SqlServerOrmLiteDialectProvider : OrmLiteDialectProviderBase<SqlServerOrmLiteDialectProvider>, IOrmLiteDialectProvider

Properties

SqlRandom

View Source
Declaration
public override string SqlRandom { get; }

Fields

Instance

View Source
Declaration
public static SqlServerOrmLiteDialectProvider Instance

Methods

GetQuotedValue(String)

View Source
Declaration
public override string GetQuotedValue(string paramValue)
Returns

System.String

Parameters
TypeName
System.StringparamValue

CreateConnection(String, Dictionary<String, String>)

View Source
Declaration
public override IDbConnection CreateConnection(string connectionString, Dictionary<string, string> options)
Returns

IDbConnection

Parameters
TypeName
System.StringconnectionString
Dictionary<System.String,System.String>options

SqlExpression<T>()

View Source
Declaration
public override SqlExpression<T> SqlExpression<T>()
Returns

ServiceStack.OrmLite.SqlExpression<T>

Type Parameters
  • T

CreateParam()

View Source
Declaration
public override IDbDataParameter CreateParam()
Returns

IDbDataParameter

ToTableNamesStatement(String)

View Source
Declaration
public override string ToTableNamesStatement(string schema)
Returns

System.String

Parameters
TypeName
System.Stringschema

ToTableNamesWithRowCountsStatement(Boolean, String)

View Source
Declaration
public override string ToTableNamesWithRowCountsStatement(bool live, string schema)
Returns

System.String

Parameters
TypeName
System.Booleanlive
System.Stringschema

GetSchemas(IDbCommand)

View Source
Declaration
public override List<string> GetSchemas(IDbCommand dbCmd)
Returns

List<System.String>

Parameters
TypeName
IDbCommanddbCmd

GetSchemaTables(IDbCommand)

View Source
Declaration
public override Dictionary<string, List<string>> GetSchemaTables(IDbCommand dbCmd)
Returns

Dictionary<System.String,List<System.String>>

Parameters
TypeName
IDbCommanddbCmd

DoesSchemaExist(IDbCommand, String)

View Source
Declaration
public override bool DoesSchemaExist(IDbCommand dbCmd, string schemaName)
Returns

System.Boolean

Parameters
TypeName
IDbCommanddbCmd
System.StringschemaName

DoesSchemaExistAsync(IDbCommand, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesSchemaExistAsync(IDbCommand dbCmd, string schemaName, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbCommanddbCmd
System.StringschemaName
CancellationTokentoken

ToCreateSchemaStatement(String)

View Source
Declaration
public override string ToCreateSchemaStatement(string schemaName)
Returns

System.String

Parameters
TypeName
System.StringschemaName

DoesTableExist(IDbCommand, String, String)

View Source
Declaration
public override bool DoesTableExist(IDbCommand dbCmd, string tableName, string schema = null)
Returns

System.Boolean

Parameters
TypeName
IDbCommanddbCmd
System.StringtableName
System.Stringschema

DoesTableExistAsync(IDbCommand, String, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesTableExistAsync(IDbCommand dbCmd, string tableName, string schema = null, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbCommanddbCmd
System.StringtableName
System.Stringschema
CancellationTokentoken

DoesColumnExist(IDbConnection, String, String, String)

View Source
Declaration
public override bool DoesColumnExist(IDbConnection db, string columnName, string tableName, string schema = null)
Returns

System.Boolean

Parameters
TypeName
IDbConnectiondb
System.StringcolumnName
System.StringtableName
System.Stringschema

DoesColumnExistAsync(IDbConnection, String, String, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesColumnExistAsync(IDbConnection db, string columnName, string tableName, string schema = null, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbConnectiondb
System.StringcolumnName
System.StringtableName
System.Stringschema
CancellationTokentoken

GetForeignKeyOnDeleteClause(ForeignKeyConstraint)

View Source
Declaration
public override string GetForeignKeyOnDeleteClause(ForeignKeyConstraint foreignKey)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ForeignKeyConstraintforeignKey

GetForeignKeyOnUpdateClause(ForeignKeyConstraint)

View Source
Declaration
public override string GetForeignKeyOnUpdateClause(ForeignKeyConstraint foreignKey)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ForeignKeyConstraintforeignKey

GetDropForeignKeyConstraints(ModelDefinition)

View Source
Declaration
public override string GetDropForeignKeyConstraints(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

ToAddColumnStatement(String, String, FieldDefinition)

View Source
Declaration
public override string ToAddColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
ServiceStack.OrmLite.FieldDefinitionfieldDef

ToAlterColumnStatement(String, String, FieldDefinition)

View Source
Declaration
public override string ToAlterColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
ServiceStack.OrmLite.FieldDefinitionfieldDef

ToChangeColumnNameStatement(String, String, FieldDefinition, String)

View Source
Declaration
public override string ToChangeColumnNameStatement(string schema, string table, FieldDefinition fieldDef, string oldColumn)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.StringoldColumn

ToRenameColumnStatement(String, String, String, String)

View Source
Declaration
public override string ToRenameColumnStatement(string schema, string table, string oldColumn, string newColumn)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
System.StringoldColumn
System.StringnewColumn

GetAutoIncrementDefinition(FieldDefinition)

View Source
Declaration
protected virtual string GetAutoIncrementDefinition(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

GetAutoIdDefaultValue(FieldDefinition)

View Source
Declaration
public override string GetAutoIdDefaultValue(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

GetColumnDefinition(FieldDefinition)

View Source
Declaration
public override string GetColumnDefinition(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

ToInsertRowStatement(IDbCommand, Object, ICollection<String>)

View Source
Declaration
public override string ToInsertRowStatement(IDbCommand cmd, object objWithProperties, ICollection<string> insertFields = null)
Returns

System.String

Parameters
TypeName
IDbCommandcmd
System.ObjectobjWithProperties
ICollection<System.String>insertFields

Sequence(String, String)

View Source
Declaration
protected string Sequence(string schema, string sequence)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringsequence

ShouldSkipInsert(FieldDefinition)

View Source
Declaration
protected override bool ShouldSkipInsert(FieldDefinition fieldDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

ShouldReturnOnInsert(ModelDefinition, FieldDefinition)

View Source
Declaration
protected virtual bool ShouldReturnOnInsert(ModelDefinition modelDef, FieldDefinition fieldDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef
ServiceStack.OrmLite.FieldDefinitionfieldDef

HasInsertReturnValues(ModelDefinition)

View Source
Declaration
public override bool HasInsertReturnValues(ModelDefinition modelDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

SupportsSequences(FieldDefinition)

View Source
Declaration
protected virtual bool SupportsSequences(FieldDefinition fieldDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

EnableIdentityInsert<T>(IDbCommand)

View Source
Declaration
public override void EnableIdentityInsert<T>(IDbCommand cmd)
Parameters
TypeName
IDbCommandcmd
Type Parameters
  • T

EnableIdentityInsertAsync<T>(IDbCommand, CancellationToken)

View Source
Declaration
public override Task EnableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken
Type Parameters
  • T

DisableIdentityInsert<T>(IDbCommand)

View Source
Declaration
public override void DisableIdentityInsert<T>(IDbCommand cmd)
Parameters
TypeName
IDbCommandcmd
Type Parameters
  • T

DisableIdentityInsertAsync<T>(IDbCommand, CancellationToken)

View Source
Declaration
public override Task DisableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken
Type Parameters
  • T

PrepareParameterizedInsertStatement<T>(IDbCommand, ICollection<String>, Func<FieldDefinition, Boolean>)

View Source
Declaration
public override void PrepareParameterizedInsertStatement<T>(IDbCommand cmd, ICollection<string> insertFields = null, Func<FieldDefinition, bool> shouldInclude = null)
Parameters
TypeName
IDbCommandcmd
ICollection<System.String>insertFields
Func<ServiceStack.OrmLite.FieldDefinition,System.Boolean>shouldInclude
Type Parameters
  • T

PrepareInsertRowStatement<T>(IDbCommand, Dictionary<String, Object>)

View Source
Declaration
public override void PrepareInsertRowStatement<T>(IDbCommand dbCmd, Dictionary<string, object> args)
Parameters
TypeName
IDbCommanddbCmd
Dictionary<System.String,System.Object>args
Type Parameters
  • T

ToSelectStatement(QueryType, ModelDefinition, String, String, String, Nullable<Int32>, Nullable<Int32>, ISet<String>)

View Source
Declaration
public override string ToSelectStatement(QueryType queryType, ModelDefinition modelDef, string selectExpression, string bodyExpression, string orderByExpression = null, int? offset = null, int? rows = null, ISet<string> tags = null)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.QueryTypequeryType
ServiceStack.OrmLite.ModelDefinitionmodelDef
System.StringselectExpression
System.StringbodyExpression
System.StringorderByExpression
System.Nullable<System.Int32>offset
System.Nullable<System.Int32>rows
ISet<System.String>tags

SqlTop(String, Int32, String)

View Source
Declaration
protected static string SqlTop(string sql, int take, string selectType = null)
Returns

System.String

Parameters
TypeName
System.Stringsql
System.Int32take
System.StringselectType

UseAliasesOrStripTablePrefixes(String)

View Source
Declaration
public static string UseAliasesOrStripTablePrefixes(string selectExpression)
Returns

System.String

Parameters
TypeName
System.StringselectExpression

GetLoadChildrenSubSelect<From>(SqlExpression<From>)

View Source
Declaration
public override string GetLoadChildrenSubSelect<From>(SqlExpression<From> expr)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.SqlExpression<T>expr
Type Parameters
  • From

SqlCurrency(String, String)

View Source
Declaration
public override string SqlCurrency(string fieldOrValue, string currencySymbol)
Returns

System.String

Parameters
TypeName
System.StringfieldOrValue
System.StringcurrencySymbol

SqlBool(Boolean)

View Source
Declaration
public override string SqlBool(bool value)
Returns

System.String

Parameters
TypeName
System.Booleanvalue

SqlLimit(Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public override string SqlLimit(int? offset = null, int? rows = null)
Returns

System.String

Parameters
TypeName
System.Nullable<System.Int32>offset
System.Nullable<System.Int32>rows

SqlCast(Object, String)

View Source
Declaration
public override string SqlCast(object fieldOrValue, string castAs)
Returns

System.String

Parameters
TypeName
System.ObjectfieldOrValue
System.StringcastAs

EnableForeignKeysCheck(IDbCommand)

View Source
Declaration
public override void EnableForeignKeysCheck(IDbCommand cmd)
Parameters
TypeName
IDbCommandcmd

EnableForeignKeysCheckAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task EnableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

DisableForeignKeysCheck(IDbCommand)

View Source
Declaration
public override void DisableForeignKeysCheck(IDbCommand cmd)
Parameters
TypeName
IDbCommandcmd

DisableForeignKeysCheckAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task DisableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

Unwrap(IDbConnection)

View Source
Declaration
protected DbConnection Unwrap(IDbConnection db)
Returns

DbConnection

Parameters
TypeName
IDbConnectiondb

Unwrap(IDbCommand)

View Source
Declaration
protected DbCommand Unwrap(IDbCommand cmd)
Returns

DbCommand

Parameters
TypeName
IDbCommandcmd

Unwrap(IDataReader)

View Source
Declaration
protected DbDataReader Unwrap(IDataReader reader)
Returns

DbDataReader

Parameters
TypeName
IDataReaderreader

OpenAsync(IDbConnection, CancellationToken)

View Source
Declaration
public override Task OpenAsync(IDbConnection db, CancellationToken token = null)
Returns

Task

Parameters
TypeName
IDbConnectiondb
CancellationTokentoken

ExecuteReaderAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<IDataReader> ExecuteReaderAsync(IDbCommand cmd, CancellationToken token = null)
Returns

Task<IDataReader>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ExecuteNonQueryAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<int> ExecuteNonQueryAsync(IDbCommand cmd, CancellationToken token = null)
Returns

Task<System.Int32>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ExecuteScalarAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<object> ExecuteScalarAsync(IDbCommand cmd, CancellationToken token = null)
Returns

Task<System.Object>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ReadAsync(IDataReader, CancellationToken)

View Source
Declaration
public override Task<bool> ReadAsync(IDataReader reader, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDataReaderreader
CancellationTokentoken

ReaderEach<T>(IDataReader, Func<T>, CancellationToken)

View Source
Declaration
public override async Task<List<T>> ReaderEach<T>(IDataReader reader, Func<T> fn, CancellationToken token = null)
Returns

Task<List<<T>>>

Parameters
TypeName
IDataReaderreader
Func<<T>>fn
CancellationTokentoken
Type Parameters
  • T

ReaderEach<Return>(IDataReader, Action, Return, CancellationToken)

View Source
Declaration
public override async Task<Return> ReaderEach<Return>(IDataReader reader, Action fn, Return source, CancellationToken token = null)
Returns

Task<<Return>>

Parameters
TypeName
IDataReaderreader
Actionfn
<Return>source
CancellationTokentoken
Type Parameters
  • Return

ReaderRead<T>(IDataReader, Func<T>, CancellationToken)

View Source
Declaration
public override async Task<T> ReaderRead<T>(IDataReader reader, Func<T> fn, CancellationToken token = null)
Returns

Task<<T>>

Parameters
TypeName
IDataReaderreader
Func<<T>>fn
CancellationTokentoken
Type Parameters
  • T

InitConnection(IDbConnection)

View Source
Declaration
public override void InitConnection(IDbConnection dbConn)
Parameters
TypeName
IDbConnectiondbConn

Implements