IOrmLiteDialectProvider
Assembly: ServiceStack.OrmLite.dll
Declaration
public interface IOrmLiteDialectProvider
Properties
OnOpenConnection
Custom delegate invoked when a DB Connection is opened
Declaration
Action<IDbConnection> OnOpenConnection { get; set; }
ExecFilter
Declaration
IOrmLiteExecFilter ExecFilter { get; set; }
ParamString
Declaration
string ParamString { get; set; }
NamingStrategy
Declaration
INamingStrategy NamingStrategy { get; set; }
StringSerializer
Declaration
IStringSerializer StringSerializer { get; set; }
ParamNameFilter
Declaration
Func<string, string> ParamNameFilter { get; set; }
Variables
Declaration
Dictionary<string, string> Variables { get; }
SqlRandom
Declaration
string SqlRandom { get; }
Methods
RegisterConverter<T>(IOrmLiteConverter)
Declaration
void RegisterConverter<T>(IOrmLiteConverter converter)
Parameters
Type Parameters
InitConnection(IDbConnection)
Invoked when a DB Connection is opened
Declaration
void InitConnection(IDbConnection dbConn)
Parameters
Type | Name |
---|
IDbConnection | dbConn |
GetConverter(Type)
Gets the explicit Converter registered for a specific type
Declaration
IOrmLiteConverter GetConverter(Type type)
Returns
ServiceStack.OrmLite.IOrmLiteConverter
Parameters
GetConverterBestMatch(Type)
Return best matching converter, falling back to Enum, Value or Ref Type Converters
Declaration
IOrmLiteConverter GetConverterBestMatch(Type type)
Returns
ServiceStack.OrmLite.IOrmLiteConverter
Parameters
GetConverterBestMatch(FieldDefinition)
Declaration
IOrmLiteConverter GetConverterBestMatch(FieldDefinition fieldDef)
Returns
ServiceStack.OrmLite.IOrmLiteConverter
Parameters
EscapeWildcards(String)
Declaration
string EscapeWildcards(string value)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
GetQuotedValue(String)
Quote the string so that it can be used inside an SQL-expression
Escape quotes inside the string
Declaration
string GetQuotedValue(string paramValue)
Returns
System.String
Parameters
Type | Name |
---|
System.String | paramValue |
GetQuotedValue(Object, Type)
Declaration
string GetQuotedValue(object value, Type fieldType)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | value |
Type | fieldType |
GetDefaultValue(Type, String)
Declaration
string GetDefaultValue(Type tableType, string fieldName)
Returns
System.String
Parameters
Type | Name |
---|
Type | tableType |
System.String | fieldName |
GetDefaultValue(FieldDefinition)
Declaration
string GetDefaultValue(FieldDefinition fieldDef)
Returns
System.String
Parameters
HasInsertReturnValues(ModelDefinition)
Declaration
bool HasInsertReturnValues(ModelDefinition modelDef)
Returns
System.Boolean
Parameters
GetParamValue(Object, Type)
Declaration
object GetParamValue(object value, Type fieldType)
Returns
System.Object
Parameters
Type | Name |
---|
System.Object | value |
Type | fieldType |
InitQueryParam(IDbDataParameter)
Declaration
void InitQueryParam(IDbDataParameter param)
Parameters
Type | Name |
---|
IDbDataParameter | param |
InitUpdateParam(IDbDataParameter)
Declaration
void InitUpdateParam(IDbDataParameter param)
Parameters
Type | Name |
---|
IDbDataParameter | param |
ToDbValue(Object, Type)
Declaration
object ToDbValue(object value, Type type)
Returns
System.Object
Parameters
Type | Name |
---|
System.Object | value |
Type | type |
FromDbValue(Object, Type)
Declaration
object FromDbValue(object value, Type type)
Returns
System.Object
Parameters
Type | Name |
---|
System.Object | value |
Type | type |
GetValue(IDataReader, Int32, Type)
Declaration
object GetValue(IDataReader reader, int columnIndex, Type type)
Returns
System.Object
Parameters
Type | Name |
---|
IDataReader | reader |
System.Int32 | columnIndex |
Type | type |
GetValues(IDataReader, Object[])
Declaration
int GetValues(IDataReader reader, object[] values)
Returns
System.Int32
Parameters
Type | Name |
---|
IDataReader | reader |
System.Object[] | values |
CreateConnection(String, Dictionary<String, String>)
Declaration
IDbConnection CreateConnection(string filePath, Dictionary<string, string> options)
Returns
IDbConnection
Parameters
Type | Name |
---|
System.String | filePath |
Dictionary<System.String,System.String> | options |
GetTableName(ModelDefinition)
Declaration
string GetTableName(ModelDefinition modelDef)
Returns
System.String
Parameters
GetTableName(ModelDefinition, Boolean)
Declaration
string GetTableName(ModelDefinition modelDef, bool useStrategy)
Returns
System.String
Parameters
GetTableName(String, String)
Declaration
string GetTableName(string table, string schema = null)
Returns
System.String
Parameters
Type | Name |
---|
System.String | table |
System.String | schema |
GetTableName(String, String, Boolean)
Declaration
string GetTableName(string table, string schema, bool useStrategy)
Returns
System.String
Parameters
Type | Name |
---|
System.String | table |
System.String | schema |
System.Boolean | useStrategy |
GetQuotedTableName(ModelDefinition)
Declaration
string GetQuotedTableName(ModelDefinition modelDef)
Returns
System.String
Parameters
GetQuotedTableName(String, String)
Declaration
string GetQuotedTableName(string tableName, string schema = null)
Returns
System.String
Parameters
Type | Name |
---|
System.String | tableName |
System.String | schema |
GetQuotedTableName(String, String, Boolean)
Declaration
string GetQuotedTableName(string tableName, string schema, bool useStrategy)
Returns
System.String
Parameters
Type | Name |
---|
System.String | tableName |
System.String | schema |
System.Boolean | useStrategy |
GetQuotedColumnName(String)
Declaration
string GetQuotedColumnName(string columnName)
Returns
System.String
Parameters
Type | Name |
---|
System.String | columnName |
GetQuotedName(String)
Declaration
string GetQuotedName(string name)
Returns
System.String
Parameters
Type | Name |
---|
System.String | name |
GetQuotedName(String, String)
Declaration
string GetQuotedName(string name, string schema)
Returns
System.String
Parameters
Type | Name |
---|
System.String | name |
System.String | schema |
SanitizeFieldNameForParamName(String)
Declaration
string SanitizeFieldNameForParamName(string fieldName)
Returns
System.String
Parameters
Type | Name |
---|
System.String | fieldName |
GetColumnDefinition(FieldDefinition)
Declaration
string GetColumnDefinition(FieldDefinition fieldDef)
Returns
System.String
Parameters
GetLastInsertId(IDbCommand)
Declaration
long GetLastInsertId(IDbCommand command)
Returns
System.Int64
Parameters
Type | Name |
---|
IDbCommand | command |
GetLastInsertIdSqlSuffix<T>()
Declaration
string GetLastInsertIdSqlSuffix<T>()
Returns
System.String
Type Parameters
ToSelectStatement(Type, String, Object[])
Declaration
string ToSelectStatement(Type tableType, string sqlFilter, params object[] filterParams)
Returns
System.String
Parameters
Type | Name |
---|
Type | tableType |
System.String | sqlFilter |
System.Object[] | filterParams |
ToSelectStatement(QueryType, ModelDefinition, String, String, String, Nullable<Int32>, Nullable<Int32>, ISet<String>)
Declaration
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
ToInsertRowStatement(IDbCommand, Object, ICollection<String>)
Declaration
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 |
PrepareParameterizedInsertStatement<T>(IDbCommand, ICollection<String>, Func<FieldDefinition, Boolean>)
Declaration
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
PrepareParameterizedUpdateStatement<T>(IDbCommand, ICollection<String>)
Declaration
bool PrepareParameterizedUpdateStatement<T>(IDbCommand cmd, ICollection<string> updateFields = null)
Returns
System.Boolean
: If had RowVersion
Parameters
Type | Name |
---|
IDbCommand | cmd |
ICollection<System.String> | updateFields |
Type Parameters
PrepareParameterizedDeleteStatement<T>(IDbCommand, IDictionary<String, Object>)
Declaration
bool PrepareParameterizedDeleteStatement<T>(IDbCommand cmd, IDictionary<string, object> deleteFieldValues)
Returns
System.Boolean
: If had RowVersion
Parameters
Type | Name |
---|
IDbCommand | cmd |
IDictionary<System.String,System.Object> | deleteFieldValues |
Type Parameters
PrepareStoredProcedureStatement<T>(IDbCommand, T)
Declaration
void PrepareStoredProcedureStatement<T>(IDbCommand cmd, T obj)
Parameters
Type | Name |
---|
IDbCommand | cmd |
<T> | obj |
Type Parameters
SetParameterValues<T>(IDbCommand, Object)
Declaration
void SetParameterValues<T>(IDbCommand dbCmd, object obj)
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.Object | obj |
Type Parameters
SetParameter(FieldDefinition, IDbDataParameter)
Declaration
void SetParameter(FieldDefinition fieldDef, IDbDataParameter p)
Parameters
EnableIdentityInsert<T>(IDbCommand)
Declaration
void EnableIdentityInsert<T>(IDbCommand cmd)
Parameters
Type Parameters
EnableIdentityInsertAsync<T>(IDbCommand, CancellationToken)
Declaration
Task EnableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
Type Parameters
DisableIdentityInsert<T>(IDbCommand)
Declaration
void DisableIdentityInsert<T>(IDbCommand cmd)
Parameters
Type Parameters
DisableIdentityInsertAsync<T>(IDbCommand, CancellationToken)
Declaration
Task DisableIdentityInsertAsync<T>(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
Type Parameters
EnableForeignKeysCheck(IDbCommand)
Declaration
void EnableForeignKeysCheck(IDbCommand cmd)
Parameters
EnableForeignKeysCheckAsync(IDbCommand, CancellationToken)
Declaration
Task EnableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
DisableForeignKeysCheck(IDbCommand)
Declaration
void DisableForeignKeysCheck(IDbCommand cmd)
Parameters
DisableForeignKeysCheckAsync(IDbCommand, CancellationToken)
Declaration
Task DisableForeignKeysCheckAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
GetFieldDefinitionMap(ModelDefinition)
Declaration
Dictionary<string, FieldDefinition> GetFieldDefinitionMap(ModelDefinition modelDef)
Returns
Dictionary<System.String,ServiceStack.OrmLite.FieldDefinition>
Parameters
GetFieldValue(FieldDefinition, Object)
Declaration
object GetFieldValue(FieldDefinition fieldDef, object value)
Returns
System.Object
Parameters
GetFieldValue(Type, Object)
Declaration
object GetFieldValue(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|
Type | fieldType |
System.Object | value |
PrepareUpdateRowStatement(IDbCommand, Object, ICollection<String>)
Declaration
void PrepareUpdateRowStatement(IDbCommand dbCmd, object objWithProperties, ICollection<string> updateFields = null)
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.Object | objWithProperties |
ICollection<System.String> | updateFields |
PrepareUpdateRowStatement<T>(IDbCommand, Dictionary<String, Object>, String)
Declaration
void PrepareUpdateRowStatement<T>(IDbCommand dbCmd, Dictionary<string, object> args, string sqlFilter)
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
Dictionary<System.String,System.Object> | args |
System.String | sqlFilter |
Type Parameters
PrepareUpdateRowAddStatement<T>(IDbCommand, Dictionary<String, Object>, String)
Declaration
void PrepareUpdateRowAddStatement<T>(IDbCommand dbCmd, Dictionary<string, object> args, string sqlFilter)
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
Dictionary<System.String,System.Object> | args |
System.String | sqlFilter |
Type Parameters
PrepareInsertRowStatement<T>(IDbCommand, Dictionary<String, Object>)
Declaration
void PrepareInsertRowStatement<T>(IDbCommand dbCmd, Dictionary<string, object> args)
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
Dictionary<System.String,System.Object> | args |
Type Parameters
ToDeleteStatement(Type, String, Object[])
Declaration
string ToDeleteStatement(Type tableType, string sqlFilter, params object[] filterParams)
Returns
System.String
Parameters
Type | Name |
---|
Type | tableType |
System.String | sqlFilter |
System.Object[] | filterParams |
CreateParameterizedDeleteStatement(IDbConnection, Object)
Declaration
IDbCommand CreateParameterizedDeleteStatement(IDbConnection connection, object objWithProperties)
Returns
IDbCommand
Parameters
Type | Name |
---|
IDbConnection | connection |
System.Object | objWithProperties |
ToExistStatement(Type, Object, String, Object[])
Declaration
string ToExistStatement(Type fromTableType, object objWithProperties, string sqlFilter, params object[] filterParams)
Returns
System.String
Parameters
Type | Name |
---|
Type | fromTableType |
System.Object | objWithProperties |
System.String | sqlFilter |
System.Object[] | filterParams |
ToSelectFromProcedureStatement(Object, Type, String, Object[])
Declaration
string ToSelectFromProcedureStatement(object fromObjWithProperties, Type outputModelType, string sqlFilter, params object[] filterParams)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | fromObjWithProperties |
Type | outputModelType |
System.String | sqlFilter |
System.Object[] | filterParams |
ToExecuteProcedureStatement(Object)
Declaration
string ToExecuteProcedureStatement(object objWithProperties)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | objWithProperties |
ToCreateSchemaStatement(String)
Declaration
string ToCreateSchemaStatement(string schema)
Returns
System.String
Parameters
Type | Name |
---|
System.String | schema |
ToCreateTableStatement(Type)
Declaration
string ToCreateTableStatement(Type tableType)
Returns
System.String
Parameters
ToPostCreateTableStatement(ModelDefinition)
Declaration
string ToPostCreateTableStatement(ModelDefinition modelDef)
Returns
System.String
Parameters
ToPostDropTableStatement(ModelDefinition)
Declaration
string ToPostDropTableStatement(ModelDefinition modelDef)
Returns
System.String
Parameters
ToCreateIndexStatements(Type)
Declaration
List<string> ToCreateIndexStatements(Type tableType)
Returns
List<System.String>
Parameters
ToCreateSequenceStatements(Type)
Declaration
List<string> ToCreateSequenceStatements(Type tableType)
Returns
List<System.String>
Parameters
ToCreateSequenceStatement(Type, String)
Declaration
string ToCreateSequenceStatement(Type tableType, string sequenceName)
Returns
System.String
Parameters
Type | Name |
---|
Type | tableType |
System.String | sequenceName |
SequenceList(Type)
Declaration
List<string> SequenceList(Type tableType)
Returns
List<System.String>
Parameters
SequenceListAsync(Type, CancellationToken)
Declaration
Task<List<string>> SequenceListAsync(Type tableType, CancellationToken token = null)
Returns
Task<List<System.String>>
Parameters
Type | Name |
---|
Type | tableType |
CancellationToken | token |
GetSchemas(IDbCommand)
Declaration
List<string> GetSchemas(IDbCommand dbCmd)
Returns
List<System.String>
Parameters
GetSchemaTables(IDbCommand)
Declaration
Dictionary<string, List<string>> GetSchemaTables(IDbCommand dbCmd)
Returns
Dictionary<System.String,List<System.String>>
Parameters
DoesSchemaExist(IDbCommand, String)
Declaration
bool DoesSchemaExist(IDbCommand dbCmd, string schema)
Returns
System.Boolean
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.String | schema |
DoesSchemaExistAsync(IDbCommand, String, CancellationToken)
Declaration
Task<bool> DoesSchemaExistAsync(IDbCommand dbCmd, string schema, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.String | schema |
CancellationToken | token |
DoesTableExist(IDbConnection, String, String)
Declaration
bool DoesTableExist(IDbConnection db, string tableName, string schema = null)
Returns
System.Boolean
Parameters
Type | Name |
---|
IDbConnection | db |
System.String | tableName |
System.String | schema |
DoesTableExistAsync(IDbConnection, String, String, CancellationToken)
Declaration
Task<bool> DoesTableExistAsync(IDbConnection db, string tableName, string schema = null, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|
IDbConnection | db |
System.String | tableName |
System.String | schema |
CancellationToken | token |
DoesTableExist(IDbCommand, String, String)
Declaration
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)
Declaration
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 |
DoesColumnExist(IDbConnection, String, String, String)
Declaration
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)
Declaration
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 |
DoesSequenceExist(IDbCommand, String)
Declaration
bool DoesSequenceExist(IDbCommand dbCmd, string sequence)
Returns
System.Boolean
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.String | sequence |
DoesSequenceExistAsync(IDbCommand, String, CancellationToken)
Declaration
Task<bool> DoesSequenceExistAsync(IDbCommand dbCmd, string sequenceName, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
System.String | sequenceName |
CancellationToken | token |
FromDbRowVersion(Type, Object)
Declaration
object FromDbRowVersion(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|
Type | fieldType |
System.Object | value |
GetRowVersionSelectColumn(FieldDefinition, String)
Declaration
SelectItem GetRowVersionSelectColumn(FieldDefinition field, string tablePrefix = null)
Returns
ServiceStack.OrmLite.SelectItem
Parameters
GetRowVersionColumn(FieldDefinition, String)
Declaration
string GetRowVersionColumn(FieldDefinition field, string tablePrefix = null)
Returns
System.String
Parameters
GetColumnNames(ModelDefinition)
Declaration
string GetColumnNames(ModelDefinition modelDef)
Returns
System.String
Parameters
GetColumnNames(ModelDefinition, String)
Declaration
SelectItem[] GetColumnNames(ModelDefinition modelDef, string tablePrefix)
Returns
ServiceStack.OrmLite.SelectItem[]
Parameters
SqlExpression<T>()
Declaration
SqlExpression<T> SqlExpression<T>()
Returns
ServiceStack.OrmLite.SqlExpression<T>
Type Parameters
CreateParam()
Declaration
IDbDataParameter CreateParam()
Returns
IDbDataParameter
GetDropForeignKeyConstraints(ModelDefinition)
Declaration
string GetDropForeignKeyConstraints(ModelDefinition modelDef)
Returns
System.String
Parameters
ToAddColumnStatement(String, String, FieldDefinition)
Declaration
string ToAddColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns
System.String
Parameters
ToAlterColumnStatement(String, String, FieldDefinition)
Declaration
string ToAlterColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns
System.String
Parameters
ToChangeColumnNameStatement(String, String, FieldDefinition, String)
Declaration
string ToChangeColumnNameStatement(string schema, string table, FieldDefinition fieldDef, string oldColumn)
Returns
System.String
Parameters
ToRenameColumnStatement(String, String, String, String)
Declaration
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 |
ToDropColumnStatement(String, String, String)
Declaration
string ToDropColumnStatement(string schema, string table, string column)
Returns
System.String
Parameters
Type | Name |
---|
System.String | schema |
System.String | table |
System.String | column |
ToAddForeignKeyStatement<T, TForeign>(Expression<Func<T, Object>>, Expression<Func<TForeign, Object>>, OnFkOption, OnFkOption, String)
Declaration
string ToAddForeignKeyStatement<T, TForeign>(Expression<Func<T, object>> field, Expression<Func<TForeign, object>> foreignField, OnFkOption onUpdate, OnFkOption onDelete, string foreignKeyName = null)
Returns
System.String
Parameters
Type Parameters
ToCreateIndexStatement<T>(Expression<Func<T, Object>>, String, Boolean)
Declaration
string ToCreateIndexStatement<T>(Expression<Func<T, object>> field, string indexName = null, bool unique = false)
Returns
System.String
Parameters
Type | Name |
---|
Expression<Func<<T>,System.Object>> | field |
System.String | indexName |
System.Boolean | unique |
Type Parameters
OpenAsync(IDbConnection, CancellationToken)
Declaration
Task OpenAsync(IDbConnection db, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|
IDbConnection | db |
CancellationToken | token |
ExecuteReaderAsync(IDbCommand, CancellationToken)
Declaration
Task<IDataReader> ExecuteReaderAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<IDataReader>
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
ExecuteNonQueryAsync(IDbCommand, CancellationToken)
Declaration
Task<int> ExecuteNonQueryAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<System.Int32>
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
ExecuteScalarAsync(IDbCommand, CancellationToken)
Declaration
Task<object> ExecuteScalarAsync(IDbCommand cmd, CancellationToken token = null)
Returns
Task<System.Object>
Parameters
Type | Name |
---|
IDbCommand | cmd |
CancellationToken | token |
ReadAsync(IDataReader, CancellationToken)
Declaration
Task<bool> ReadAsync(IDataReader reader, CancellationToken token = null)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|
IDataReader | reader |
CancellationToken | token |
ReaderEach<T>(IDataReader, Func<T>, CancellationToken)
Declaration
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
ReaderEach<Return>(IDataReader, Action, Return, CancellationToken)
Declaration
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
ReaderRead<T>(IDataReader, Func<T>, CancellationToken)
Declaration
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
InsertAndGetLastInsertIdAsync<T>(IDbCommand, CancellationToken)
Declaration
Task<long> InsertAndGetLastInsertIdAsync<T>(IDbCommand dbCmd, CancellationToken token)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
CancellationToken | token |
Type Parameters
GetLoadChildrenSubSelect<From>(SqlExpression<From>)
Declaration
string GetLoadChildrenSubSelect<From>(SqlExpression<From> expr)
Returns
System.String
Parameters
Type Parameters
ToRowCountStatement(String)
Declaration
string ToRowCountStatement(string innerSql)
Returns
System.String
Parameters
Type | Name |
---|
System.String | innerSql |
ToUpdateStatement<T>(IDbCommand, T, ICollection<String>)
Declaration
string ToUpdateStatement<T>(IDbCommand dbCmd, T item, ICollection<string> updateFields = null)
Returns
System.String
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
<T> | item |
ICollection<System.String> | updateFields |
Type Parameters
ToInsertStatement<T>(IDbCommand, T, ICollection<String>)
Declaration
string ToInsertStatement<T>(IDbCommand dbCmd, T item, ICollection<string> insertFields = null)
Returns
System.String
Parameters
Type | Name |
---|
IDbCommand | dbCmd |
<T> | item |
ICollection<System.String> | insertFields |
Type Parameters
MergeParamsIntoSql(String, IEnumerable<IDbDataParameter>)
Declaration
string MergeParamsIntoSql(string sql, IEnumerable<IDbDataParameter> dbParams)
Returns
System.String
Parameters
Type | Name |
---|
System.String | sql |
IEnumerable<IDbDataParameter> | dbParams |
GetRefSelfSql<From>(SqlExpression<From>, ModelDefinition, FieldDefinition, ModelDefinition)
Declaration
string GetRefSelfSql<From>(SqlExpression<From> refQ, ModelDefinition modelDef, FieldDefinition refSelf, ModelDefinition refModelDef)
Returns
System.String
Parameters
Type Parameters
GetRefFieldSql(String, ModelDefinition, FieldDefinition)
Declaration
string GetRefFieldSql(string subSql, ModelDefinition refModelDef, FieldDefinition refField)
Returns
System.String
Parameters
GetFieldReferenceSql(String, FieldDefinition, FieldReference)
Declaration
string GetFieldReferenceSql(string subSql, FieldDefinition fieldDef, FieldReference fieldRef)
Returns
System.String
Parameters
ToTableNamesStatement(String)
Declaration
string ToTableNamesStatement(string schema)
Returns
System.String
Parameters
Type | Name |
---|
System.String | schema |
ToTableNamesWithRowCountsStatement(Boolean, String)
Return table, row count SQL for listing all tables with their row counts
Declaration
string ToTableNamesWithRowCountsStatement(bool live, string schema)
Returns
System.String
Parameters
Type | Name | Description |
---|
System.Boolean | live | If true returns live current row counts of each table (slower), otherwise returns cached row counts from RDBMS table stats |
|
| System.String
| schema | The table schema if any
|
SqlConflict(String, String)
Declaration
string SqlConflict(string sql, string conflictResolution)
Returns
System.String
Parameters
Type | Name |
---|
System.String | sql |
System.String | conflictResolution |
SqlConcat(IEnumerable<Object>)
Declaration
string SqlConcat(IEnumerable<object> args)
Returns
System.String
Parameters
Type | Name |
---|
IEnumerable<System.Object> | args |
SqlCurrency(String)
Declaration
string SqlCurrency(string fieldOrValue)
Returns
System.String
Parameters
Type | Name |
---|
System.String | fieldOrValue |
SqlCurrency(String, String)
Declaration
string SqlCurrency(string fieldOrValue, string currencySymbol)
Returns
System.String
Parameters
Type | Name |
---|
System.String | fieldOrValue |
System.String | currencySymbol |
SqlBool(Boolean)
Declaration
string SqlBool(bool value)
Returns
System.String
Parameters
Type | Name |
---|
System.Boolean | value |
SqlLimit(Nullable<Int32>, Nullable<Int32>)
Declaration
string SqlLimit(int? offset = null, int? rows = null)
Returns
System.String
Parameters
Type | Name |
---|
System.Nullable<System.Int32> | offset |
System.Nullable<System.Int32> | rows |
SqlCast(Object, String)
Declaration
string SqlCast(object fieldOrValue, string castAs)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | fieldOrValue |
System.String | castAs |
Generates a SQL comment.
Declaration
string GenerateComment(in string text)
Returns
System.String
: The generated SQL.
Parameters
Type | Name | Description |
---|
System.String | text | The comment text. |
|