SqlServer2008OrmLiteDialectProvider
Assembly: ServiceStack.OrmLite.SqlServer.Data.dll
View Source
public class SqlServer2008OrmLiteDialectProvider : SqlServerOrmLiteDialectProvider, IOrmLiteDialectProvider
Inherited Properties
SqlRandom
View Source
public override string SqlRandom { get; }
Fields
Instance
View Source
public static SqlServer2008OrmLiteDialectProvider Instance
Methods
SqlConcat(IEnumerable<Object>)
View Source
public override string SqlConcat(IEnumerable<object> args)
Returns
System.String
Parameters
Type | Name |
---|---|
IEnumerable<System.Object> | args |
Inherited Methods
CreateConnection(String, Dictionary<String, String>)
View Source
public override IDbConnection CreateConnection(string connectionString, Dictionary<string, string> options)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
System.String | connectionString |
Dictionary<System.String,System.String> | options |
CreateParam()
View Source
public override IDbDataParameter CreateParam()
Returns
IDbDataParameter
DisableForeignKeysCheck(IDbCommand)
View Source
public override void DisableForeignKeysCheck(IDbCommand cmd)
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
DisableForeignKeysCheckAsync(IDbCommand, CancellationToken)
View Source
public override Task DisableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
DisableIdentityInsert<T>(IDbCommand)
View Source
public override void DisableIdentityInsert<T>(IDbCommand cmd)
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
Type Parameters
T
DisableIdentityInsertAsync<T>(IDbCommand, CancellationToken)
View Source
public override Task DisableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
Type Parameters
T
DoesColumnExist(IDbConnection, String, String, String)
View Source
public override bool DoesColumnExist(IDbConnection db, string columnName, string tableName, string schema = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | columnName |
System.String | tableName |
System.String | schema |
DoesColumnExistAsync(IDbConnection, String, String, String, CancellationToken)
View Source
public override async Task<bool> DoesColumnExistAsync(IDbConnection db, string columnName, string tableName, string schema = null, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | columnName |
System.String | tableName |
System.String | schema |
CancellationToken | token |
DoesSchemaExist(IDbCommand, String)
View Source
public override bool DoesSchemaExist(IDbCommand dbCmd, string schemaName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
System.String | schemaName |
DoesSchemaExistAsync(IDbCommand, String, CancellationToken)
View Source
public override async Task<bool> DoesSchemaExistAsync(IDbCommand dbCmd, string schemaName, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
System.String | schemaName |
CancellationToken | token |
DoesTableExist(IDbCommand, String, String)
View Source
public override bool DoesTableExist(IDbCommand dbCmd, string tableName, string schema = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
System.String | tableName |
System.String | schema |
DoesTableExistAsync(IDbCommand, String, String, CancellationToken)
View Source
public override async Task<bool> DoesTableExistAsync(IDbCommand dbCmd, string tableName, string schema = null, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
System.String | tableName |
System.String | schema |
CancellationToken | token |
EnableForeignKeysCheck(IDbCommand)
View Source
public override void EnableForeignKeysCheck(IDbCommand cmd)
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
EnableForeignKeysCheckAsync(IDbCommand, CancellationToken)
View Source
public override Task EnableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
EnableIdentityInsert<T>(IDbCommand)
View Source
public override void EnableIdentityInsert<T>(IDbCommand cmd)
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
Type Parameters
T
EnableIdentityInsertAsync<T>(IDbCommand, CancellationToken)
View Source
public override Task EnableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
Type Parameters
T
ExecuteNonQueryAsync(IDbCommand, CancellationToken)
View Source
public override Task<int> ExecuteNonQueryAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<System.Int32>
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
ExecuteReaderAsync(IDbCommand, CancellationToken)
View Source
public override Task<IDataReader> ExecuteReaderAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<IDataReader>
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
ExecuteScalarAsync(IDbCommand, CancellationToken)
View Source
public override Task<object> ExecuteScalarAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
CancellationToken | token |
GetAutoIdDefaultValue(FieldDefinition)
View Source
public override string GetAutoIdDefaultValue(FieldDefinition fieldDef)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
GetAutoIncrementDefinition(FieldDefinition)
View Source
protected virtual string GetAutoIncrementDefinition(FieldDefinition fieldDef)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
GetColumnDefinition(FieldDefinition)
View Source
public override string GetColumnDefinition(FieldDefinition fieldDef)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
GetDropForeignKeyConstraints(ModelDefinition)
View Source
public override string GetDropForeignKeyConstraints(ModelDefinition modelDef)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ModelDefinition | modelDef |
GetForeignKeyOnDeleteClause(ForeignKeyConstraint)
View Source
public override string GetForeignKeyOnDeleteClause(ForeignKeyConstraint foreignKey)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ForeignKeyConstraint | foreignKey |
GetForeignKeyOnUpdateClause(ForeignKeyConstraint)
View Source
public override string GetForeignKeyOnUpdateClause(ForeignKeyConstraint foreignKey)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ForeignKeyConstraint | foreignKey |
GetLoadChildrenSubSelect<From>(SqlExpression<From>)
View Source
public override string GetLoadChildrenSubSelect<From>(SqlExpression<From> expr)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.SqlExpression<T> | expr |
Type Parameters
From
GetQuotedValue(String)
View Source
public override string GetQuotedValue(string paramValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | paramValue |
GetSchemas(IDbCommand)
View Source
public override List<string> GetSchemas(IDbCommand dbCmd)
Returns
List<System.String>
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
GetSchemaTables(IDbCommand)
View Source
public override Dictionary<string, List<string>> GetSchemaTables(IDbCommand dbCmd)
Returns
Dictionary<System.String,List<System.String>>
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
HasInsertReturnValues(ModelDefinition)
View Source
public override bool HasInsertReturnValues(ModelDefinition modelDef)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ModelDefinition | modelDef |
InitConnection(IDbConnection)
View Source
public override void InitConnection(IDbConnection dbConn)
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
OpenAsync(IDbConnection, CancellationToken)
View Source
public override Task OpenAsync(IDbConnection db, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbConnection | db |
CancellationToken | token |
PrepareInsertRowStatement<T>(IDbCommand, Dictionary<String, Object>)
View Source
public override void PrepareInsertRowStatement<T>(IDbCommand dbCmd, Dictionary<string, object> args)
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
Dictionary<System.String,System.Object> | args |
Type Parameters
T
PrepareParameterizedInsertStatement<T>(IDbCommand, ICollection<String>, Func<FieldDefinition, Boolean>)
View Source
public override void PrepareParameterizedInsertStatement<T>(IDbCommand cmd, ICollection<string> insertFields = null, Func<FieldDefinition, bool> shouldInclude = null)
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
ICollection<System.String> | insertFields |
Func<ServiceStack.OrmLite.FieldDefinition,System.Boolean> | shouldInclude |
Type Parameters
T
ReadAsync(IDataReader, CancellationToken)
View Source
public override Task<bool> ReadAsync(IDataReader reader, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|---|
IDataReader | reader |
CancellationToken | token |
ReaderEach<Return>(IDataReader, Action, Return, CancellationToken)
View Source
public override async Task<Return> ReaderEach<Return>(IDataReader reader, Action fn, Return source, CancellationToken token = null)
Returns
Task<<Return>>
Parameters
Type | Name |
---|---|
IDataReader | reader |
Action | fn |
<Return> | source |
CancellationToken | token |
Type Parameters
Return
ReaderEach<T>(IDataReader, Func<T>, CancellationToken)
View Source
public override async Task<List<T>> ReaderEach<T>(IDataReader reader, Func<T> fn, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDataReader | reader |
Func<<T>> | fn |
CancellationToken | token |
Type Parameters
T
ReaderRead<T>(IDataReader, Func<T>, CancellationToken)
View Source
public override async Task<T> ReaderRead<T>(IDataReader reader, Func<T> fn, CancellationToken token = null)
Returns
Task<<T>>
Parameters
Type | Name |
---|---|
IDataReader | reader |
Func<<T>> | fn |
CancellationToken | token |
Type Parameters
T
Sequence(String, String)
View Source
protected string Sequence(string schema, string sequence)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
System.String | sequence |
ShouldReturnOnInsert(ModelDefinition, FieldDefinition)
View Source
protected virtual bool ShouldReturnOnInsert(ModelDefinition modelDef, FieldDefinition fieldDef)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.ModelDefinition | modelDef |
ServiceStack.OrmLite.FieldDefinition | fieldDef |
ShouldSkipInsert(FieldDefinition)
View Source
protected override bool ShouldSkipInsert(FieldDefinition fieldDef)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
SqlBool(Boolean)
View Source
public override string SqlBool(bool value)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Boolean | value |
SqlCast(Object, String)
View Source
public override string SqlCast(object fieldOrValue, string castAs)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | fieldOrValue |
System.String | castAs |
SqlCurrency(String, String)
View Source
public override string SqlCurrency(string fieldOrValue, string currencySymbol)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | fieldOrValue |
System.String | currencySymbol |
SqlExpression<T>()
View Source
public override SqlExpression<T> SqlExpression<T>()
Returns
ServiceStack.OrmLite.SqlExpression<T>
Type Parameters
T
SqlLimit(Nullable<Int32>, Nullable<Int32>)
View Source
public override string SqlLimit(int? offset = null, int? rows = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Nullable<System.Int32> | offset |
System.Nullable<System.Int32> | rows |
SqlTop(String, Int32, String)
View Source
protected static string SqlTop(string sql, int take, string selectType = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | sql |
System.Int32 | take |
System.String | selectType |
SupportsSequences(FieldDefinition)
View Source
protected virtual bool SupportsSequences(FieldDefinition fieldDef)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
ToAddColumnStatement(String, String, FieldDefinition)
View Source
public override string ToAddColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
System.String | table |
ServiceStack.OrmLite.FieldDefinition | fieldDef |
ToAlterColumnStatement(String, String, FieldDefinition)
View Source
public override string ToAlterColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
System.String | table |
ServiceStack.OrmLite.FieldDefinition | fieldDef |
ToChangeColumnNameStatement(String, String, FieldDefinition, String)
View Source
public override string ToChangeColumnNameStatement(string schema, string table, FieldDefinition fieldDef, string oldColumn)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
System.String | table |
ServiceStack.OrmLite.FieldDefinition | fieldDef |
System.String | oldColumn |
ToCreateSchemaStatement(String)
View Source
public override string ToCreateSchemaStatement(string schemaName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schemaName |
ToInsertRowStatement(IDbCommand, Object, ICollection<String>)
View Source
public override string ToInsertRowStatement(IDbCommand cmd, object objWithProperties, ICollection<string> insertFields = null)
Returns
System.String
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
System.Object | objWithProperties |
ICollection<System.String> | insertFields |
ToRenameColumnStatement(String, String, String, String)
View Source
public override string ToRenameColumnStatement(string schema, string table, string oldColumn, string newColumn)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
System.String | table |
System.String | oldColumn |
System.String | newColumn |
ToSelectStatement(QueryType, ModelDefinition, String, String, String, Nullable<Int32>, Nullable<Int32>, ISet<String>)
View Source
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
Type | Name |
---|---|
ServiceStack.OrmLite.QueryType | queryType |
ServiceStack.OrmLite.ModelDefinition | modelDef |
System.String | selectExpression |
System.String | bodyExpression |
System.String | orderByExpression |
System.Nullable<System.Int32> | offset |
System.Nullable<System.Int32> | rows |
ISet<System.String> | tags |
ToTableNamesStatement(String)
View Source
public override string ToTableNamesStatement(string schema)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | schema |
ToTableNamesWithRowCountsStatement(Boolean, String)
View Source
public override string ToTableNamesWithRowCountsStatement(bool live, string schema)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Boolean | live |
System.String | schema |
Unwrap(IDataReader)
View Source
protected DbDataReader Unwrap(IDataReader reader)
Returns
DbDataReader
Parameters
Type | Name |
---|---|
IDataReader | reader |
Unwrap(IDbCommand)
View Source
protected DbCommand Unwrap(IDbCommand cmd)
Returns
DbCommand
Parameters
Type | Name |
---|---|
IDbCommand | cmd |
Unwrap(IDbConnection)
View Source
protected DbConnection Unwrap(IDbConnection db)
Returns
DbConnection
Parameters
Type | Name |
---|---|
IDbConnection | db |
UseAliasesOrStripTablePrefixes(String)
View Source
public static string UseAliasesOrStripTablePrefixes(string selectExpression)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | selectExpression |