Skip to main content

IOrmLiteDialectProvider

Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public interface IOrmLiteDialectProvider

Properties

OnOpenConnection

Custom delegate invoked when a DB Connection is opened

View Source
Declaration
Action<IDbConnection> OnOpenConnection { get; set; }

ExecFilter

View Source
Declaration
IOrmLiteExecFilter ExecFilter { get; set; }

ParamString

View Source
Declaration
string ParamString { get; set; }

NamingStrategy

View Source
Declaration
INamingStrategy NamingStrategy { get; set; }

StringSerializer

View Source
Declaration
IStringSerializer StringSerializer { get; set; }

ParamNameFilter

View Source
Declaration
Func<string, string> ParamNameFilter { get; set; }

Variables

View Source
Declaration
Dictionary<string, string> Variables { get; }

SqlRandom

View Source
Declaration
string SqlRandom { get; }

Methods

RegisterConverter<T>(IOrmLiteConverter)

View Source
Declaration
void RegisterConverter<T>(IOrmLiteConverter converter)
Parameters
TypeName
ServiceStack.OrmLite.IOrmLiteConverterconverter
Type Parameters
  • T

InitConnection(IDbConnection)

Invoked when a DB Connection is opened

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

GetConverter(Type)

Gets the explicit Converter registered for a specific type

View Source
Declaration
IOrmLiteConverter GetConverter(Type type)
Returns

ServiceStack.OrmLite.IOrmLiteConverter

Parameters
TypeName
Typetype

GetConverterBestMatch(Type)

Return best matching converter, falling back to Enum, Value or Ref Type Converters

View Source
Declaration
IOrmLiteConverter GetConverterBestMatch(Type type)
Returns

ServiceStack.OrmLite.IOrmLiteConverter

Parameters
TypeName
Typetype

GetConverterBestMatch(FieldDefinition)

View Source
Declaration
IOrmLiteConverter GetConverterBestMatch(FieldDefinition fieldDef)
Returns

ServiceStack.OrmLite.IOrmLiteConverter

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

EscapeWildcards(String)

View Source
Declaration
string EscapeWildcards(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

GetQuotedValue(String)

Quote the string so that it can be used inside an SQL-expression Escape quotes inside the string

View Source
Declaration
string GetQuotedValue(string paramValue)
Returns

System.String

Parameters
TypeName
System.StringparamValue

GetQuotedValue(Object, Type)

View Source
Declaration
string GetQuotedValue(object value, Type fieldType)
Returns

System.String

Parameters
TypeName
System.Objectvalue
TypefieldType

GetDefaultValue(Type, String)

View Source
Declaration
string GetDefaultValue(Type tableType, string fieldName)
Returns

System.String

Parameters
TypeName
TypetableType
System.StringfieldName

GetDefaultValue(FieldDefinition)

View Source
Declaration
string GetDefaultValue(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

HasInsertReturnValues(ModelDefinition)

View Source
Declaration
bool HasInsertReturnValues(ModelDefinition modelDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetParamValue(Object, Type)

View Source
Declaration
object GetParamValue(object value, Type fieldType)
Returns

System.Object

Parameters
TypeName
System.Objectvalue
TypefieldType

InitQueryParam(IDbDataParameter)

View Source
Declaration
void InitQueryParam(IDbDataParameter param)
Parameters
TypeName
IDbDataParameterparam

InitUpdateParam(IDbDataParameter)

View Source
Declaration
void InitUpdateParam(IDbDataParameter param)
Parameters
TypeName
IDbDataParameterparam

ToDbValue(Object, Type)

View Source
Declaration
object ToDbValue(object value, Type type)
Returns

System.Object

Parameters
TypeName
System.Objectvalue
Typetype

FromDbValue(Object, Type)

View Source
Declaration
object FromDbValue(object value, Type type)
Returns

System.Object

Parameters
TypeName
System.Objectvalue
Typetype

GetValue(IDataReader, Int32, Type)

View Source
Declaration
object GetValue(IDataReader reader, int columnIndex, Type type)
Returns

System.Object

Parameters
TypeName
IDataReaderreader
System.Int32columnIndex
Typetype

GetValues(IDataReader, Object[])

View Source
Declaration
int GetValues(IDataReader reader, object[] values)
Returns

System.Int32

Parameters
TypeName
IDataReaderreader
System.Object[]values

CreateConnection(String, Dictionary<String, String>)

View Source
Declaration
IDbConnection CreateConnection(string filePath, Dictionary<string, string> options)
Returns

IDbConnection

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

GetTableName(ModelDefinition)

View Source
Declaration
string GetTableName(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetTableName(ModelDefinition, Boolean)

View Source
Declaration
string GetTableName(ModelDefinition modelDef, bool useStrategy)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef
System.BooleanuseStrategy

GetTableName(String, String)

View Source
Declaration
string GetTableName(string table, string schema = null)
Returns

System.String

Parameters
TypeName
System.Stringtable
System.Stringschema

GetTableName(String, String, Boolean)

View Source
Declaration
string GetTableName(string table, string schema, bool useStrategy)
Returns

System.String

Parameters
TypeName
System.Stringtable
System.Stringschema
System.BooleanuseStrategy

GetQuotedTableName(ModelDefinition)

View Source
Declaration
string GetQuotedTableName(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetQuotedTableName(String, String)

View Source
Declaration
string GetQuotedTableName(string tableName, string schema = null)
Returns

System.String

Parameters
TypeName
System.StringtableName
System.Stringschema

GetQuotedTableName(String, String, Boolean)

View Source
Declaration
string GetQuotedTableName(string tableName, string schema, bool useStrategy)
Returns

System.String

Parameters
TypeName
System.StringtableName
System.Stringschema
System.BooleanuseStrategy

GetQuotedColumnName(String)

View Source
Declaration
string GetQuotedColumnName(string columnName)
Returns

System.String

Parameters
TypeName
System.StringcolumnName

GetQuotedName(String)

View Source
Declaration
string GetQuotedName(string name)
Returns

System.String

Parameters
TypeName
System.Stringname

GetQuotedName(String, String)

View Source
Declaration
string GetQuotedName(string name, string schema)
Returns

System.String

Parameters
TypeName
System.Stringname
System.Stringschema

SanitizeFieldNameForParamName(String)

View Source
Declaration
string SanitizeFieldNameForParamName(string fieldName)
Returns

System.String

Parameters
TypeName
System.StringfieldName

GetColumnDefinition(FieldDefinition)

View Source
Declaration
string GetColumnDefinition(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

GetLastInsertId(IDbCommand)

View Source
Declaration
long GetLastInsertId(IDbCommand command)
Returns

System.Int64

Parameters
TypeName
IDbCommandcommand

GetLastInsertIdSqlSuffix<T>()

View Source
Declaration
string GetLastInsertIdSqlSuffix<T>()
Returns

System.String

Type Parameters
  • T

ToSelectStatement(Type, String, Object[])

View Source
Declaration
string ToSelectStatement(Type tableType, string sqlFilter, params object[] filterParams)
Returns

System.String

Parameters
TypeName
TypetableType
System.StringsqlFilter
System.Object[]filterParams

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

View Source
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
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

ToInsertRowStatement(IDbCommand, Object, ICollection<String>)

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

System.String

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

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

View Source
Declaration
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

PrepareParameterizedUpdateStatement<T>(IDbCommand, ICollection<String>)

View Source
Declaration
bool PrepareParameterizedUpdateStatement<T>(IDbCommand cmd, ICollection<string> updateFields = null)
Returns

System.Boolean: If had RowVersion

Parameters
TypeName
IDbCommandcmd
ICollection<System.String>updateFields
Type Parameters
  • T

PrepareParameterizedDeleteStatement<T>(IDbCommand, IDictionary<String, Object>)

View Source
Declaration
bool PrepareParameterizedDeleteStatement<T>(IDbCommand cmd, IDictionary<string, object> deleteFieldValues)
Returns

System.Boolean: If had RowVersion

Parameters
TypeName
IDbCommandcmd
IDictionary<System.String,System.Object>deleteFieldValues
Type Parameters
  • T

PrepareStoredProcedureStatement<T>(IDbCommand, T)

View Source
Declaration
void PrepareStoredProcedureStatement<T>(IDbCommand cmd, T obj)
Parameters
TypeName
IDbCommandcmd
<T>obj
Type Parameters
  • T

SetParameterValues<T>(IDbCommand, Object)

View Source
Declaration
void SetParameterValues<T>(IDbCommand dbCmd, object obj)
Parameters
TypeName
IDbCommanddbCmd
System.Objectobj
Type Parameters
  • T

SetParameter(FieldDefinition, IDbDataParameter)

View Source
Declaration
void SetParameter(FieldDefinition fieldDef, IDbDataParameter p)
Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef
IDbDataParameterp

EnableIdentityInsert<T>(IDbCommand)

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

EnableIdentityInsertAsync<T>(IDbCommand, CancellationToken)

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

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken
Type Parameters
  • T

DisableIdentityInsert<T>(IDbCommand)

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

DisableIdentityInsertAsync<T>(IDbCommand, CancellationToken)

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

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken
Type Parameters
  • T

EnableForeignKeysCheck(IDbCommand)

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

EnableForeignKeysCheckAsync(IDbCommand, CancellationToken)

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

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

DisableForeignKeysCheck(IDbCommand)

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

DisableForeignKeysCheckAsync(IDbCommand, CancellationToken)

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

Task

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

GetFieldDefinitionMap(ModelDefinition)

View Source
Declaration
Dictionary<string, FieldDefinition> GetFieldDefinitionMap(ModelDefinition modelDef)
Returns

Dictionary<System.String,ServiceStack.OrmLite.FieldDefinition>

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetFieldValue(FieldDefinition, Object)

View Source
Declaration
object GetFieldValue(FieldDefinition fieldDef, object value)
Returns

System.Object

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.Objectvalue

GetFieldValue(Type, Object)

View Source
Declaration
object GetFieldValue(Type fieldType, object value)
Returns

System.Object

Parameters
TypeName
TypefieldType
System.Objectvalue

PrepareUpdateRowStatement(IDbCommand, Object, ICollection<String>)

View Source
Declaration
void PrepareUpdateRowStatement(IDbCommand dbCmd, object objWithProperties, ICollection<string> updateFields = null)
Parameters
TypeName
IDbCommanddbCmd
System.ObjectobjWithProperties
ICollection<System.String>updateFields

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

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

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

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

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

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

ToDeleteStatement(Type, String, Object[])

View Source
Declaration
string ToDeleteStatement(Type tableType, string sqlFilter, params object[] filterParams)
Returns

System.String

Parameters
TypeName
TypetableType
System.StringsqlFilter
System.Object[]filterParams

CreateParameterizedDeleteStatement(IDbConnection, Object)

View Source
Declaration
IDbCommand CreateParameterizedDeleteStatement(IDbConnection connection, object objWithProperties)
Returns

IDbCommand

Parameters
TypeName
IDbConnectionconnection
System.ObjectobjWithProperties

ToExistStatement(Type, Object, String, Object[])

View Source
Declaration
string ToExistStatement(Type fromTableType, object objWithProperties, string sqlFilter, params object[] filterParams)
Returns

System.String

Parameters
TypeName
TypefromTableType
System.ObjectobjWithProperties
System.StringsqlFilter
System.Object[]filterParams

ToSelectFromProcedureStatement(Object, Type, String, Object[])

View Source
Declaration
string ToSelectFromProcedureStatement(object fromObjWithProperties, Type outputModelType, string sqlFilter, params object[] filterParams)
Returns

System.String

Parameters
TypeName
System.ObjectfromObjWithProperties
TypeoutputModelType
System.StringsqlFilter
System.Object[]filterParams

ToExecuteProcedureStatement(Object)

View Source
Declaration
string ToExecuteProcedureStatement(object objWithProperties)
Returns

System.String

Parameters
TypeName
System.ObjectobjWithProperties

ToCreateSchemaStatement(String)

View Source
Declaration
string ToCreateSchemaStatement(string schema)
Returns

System.String

Parameters
TypeName
System.Stringschema

ToCreateTableStatement(Type)

View Source
Declaration
string ToCreateTableStatement(Type tableType)
Returns

System.String

Parameters
TypeName
TypetableType

ToPostCreateTableStatement(ModelDefinition)

View Source
Declaration
string ToPostCreateTableStatement(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

ToPostDropTableStatement(ModelDefinition)

View Source
Declaration
string ToPostDropTableStatement(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

ToCreateIndexStatements(Type)

View Source
Declaration
List<string> ToCreateIndexStatements(Type tableType)
Returns

List<System.String>

Parameters
TypeName
TypetableType

ToCreateSequenceStatements(Type)

View Source
Declaration
List<string> ToCreateSequenceStatements(Type tableType)
Returns

List<System.String>

Parameters
TypeName
TypetableType

ToCreateSequenceStatement(Type, String)

View Source
Declaration
string ToCreateSequenceStatement(Type tableType, string sequenceName)
Returns

System.String

Parameters
TypeName
TypetableType
System.StringsequenceName

SequenceList(Type)

View Source
Declaration
List<string> SequenceList(Type tableType)
Returns

List<System.String>

Parameters
TypeName
TypetableType

SequenceListAsync(Type, CancellationToken)

View Source
Declaration
Task<List<string>> SequenceListAsync(Type tableType, CancellationToken token = null)
Returns

Task<List<System.String>>

Parameters
TypeName
TypetableType
CancellationTokentoken

GetSchemas(IDbCommand)

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

List<System.String>

Parameters
TypeName
IDbCommanddbCmd

GetSchemaTables(IDbCommand)

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

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

Parameters
TypeName
IDbCommanddbCmd

DoesSchemaExist(IDbCommand, String)

View Source
Declaration
bool DoesSchemaExist(IDbCommand dbCmd, string schema)
Returns

System.Boolean

Parameters
TypeName
IDbCommanddbCmd
System.Stringschema

DoesSchemaExistAsync(IDbCommand, String, CancellationToken)

View Source
Declaration
Task<bool> DoesSchemaExistAsync(IDbCommand dbCmd, string schema, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbCommanddbCmd
System.Stringschema
CancellationTokentoken

DoesTableExist(IDbConnection, String, String)

View Source
Declaration
bool DoesTableExist(IDbConnection db, string tableName, string schema = null)
Returns

System.Boolean

Parameters
TypeName
IDbConnectiondb
System.StringtableName
System.Stringschema

DoesTableExistAsync(IDbConnection, String, String, CancellationToken)

View Source
Declaration
Task<bool> DoesTableExistAsync(IDbConnection db, string tableName, string schema = null, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbConnectiondb
System.StringtableName
System.Stringschema
CancellationTokentoken

DoesTableExist(IDbCommand, String, String)

View Source
Declaration
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
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
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
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

DoesSequenceExist(IDbCommand, String)

View Source
Declaration
bool DoesSequenceExist(IDbCommand dbCmd, string sequence)
Returns

System.Boolean

Parameters
TypeName
IDbCommanddbCmd
System.Stringsequence

DoesSequenceExistAsync(IDbCommand, String, CancellationToken)

View Source
Declaration
Task<bool> DoesSequenceExistAsync(IDbCommand dbCmd, string sequenceName, CancellationToken token = null)
Returns

Task<System.Boolean>

Parameters
TypeName
IDbCommanddbCmd
System.StringsequenceName
CancellationTokentoken

FromDbRowVersion(Type, Object)

View Source
Declaration
object FromDbRowVersion(Type fieldType, object value)
Returns

System.Object

Parameters
TypeName
TypefieldType
System.Objectvalue

GetRowVersionSelectColumn(FieldDefinition, String)

View Source
Declaration
SelectItem GetRowVersionSelectColumn(FieldDefinition field, string tablePrefix = null)
Returns

ServiceStack.OrmLite.SelectItem

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfield
System.StringtablePrefix

GetRowVersionColumn(FieldDefinition, String)

View Source
Declaration
string GetRowVersionColumn(FieldDefinition field, string tablePrefix = null)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfield
System.StringtablePrefix

GetColumnNames(ModelDefinition)

View Source
Declaration
string GetColumnNames(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetColumnNames(ModelDefinition, String)

View Source
Declaration
SelectItem[] GetColumnNames(ModelDefinition modelDef, string tablePrefix)
Returns

ServiceStack.OrmLite.SelectItem[]

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef
System.StringtablePrefix

SqlExpression<T>()

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

ServiceStack.OrmLite.SqlExpression<T>

Type Parameters
  • T

CreateParam()

View Source
Declaration
IDbDataParameter CreateParam()
Returns

IDbDataParameter

GetDropForeignKeyConstraints(ModelDefinition)

View Source
Declaration
string GetDropForeignKeyConstraints(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

ToAddColumnStatement(String, String, FieldDefinition)

View Source
Declaration
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
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
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
string ToRenameColumnStatement(string schema, string table, string oldColumn, string newColumn)
Returns

System.String

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

ToDropColumnStatement(String, String, String)

View Source
Declaration
string ToDropColumnStatement(string schema, string table, string column)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
System.Stringcolumn

ToAddForeignKeyStatement<T, TForeign>(Expression<Func<T, Object>>, Expression<Func<TForeign, Object>>, OnFkOption, OnFkOption, String)

View Source
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
TypeName
Expression<Func<<T>,System.Object>>field
Expression<Func<<TForeign>,System.Object>>foreignField
ServiceStack.OrmLite.OnFkOptiononUpdate
ServiceStack.OrmLite.OnFkOptiononDelete
System.StringforeignKeyName
Type Parameters
  • T
  • TForeign

ToCreateIndexStatement<T>(Expression<Func<T, Object>>, String, Boolean)

View Source
Declaration
string ToCreateIndexStatement<T>(Expression<Func<T, object>> field, string indexName = null, bool unique = false)
Returns

System.String

Parameters
TypeName
Expression<Func<<T>,System.Object>>field
System.StringindexName
System.Booleanunique
Type Parameters
  • T

OpenAsync(IDbConnection, CancellationToken)

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

Task

Parameters
TypeName
IDbConnectiondb
CancellationTokentoken

ExecuteReaderAsync(IDbCommand, CancellationToken)

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

Task<IDataReader>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ExecuteNonQueryAsync(IDbCommand, CancellationToken)

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

Task<System.Int32>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ExecuteScalarAsync(IDbCommand, CancellationToken)

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

Task<System.Object>

Parameters
TypeName
IDbCommandcmd
CancellationTokentoken

ReadAsync(IDataReader, CancellationToken)

View Source
Declaration
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
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
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
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

InsertAndGetLastInsertIdAsync<T>(IDbCommand, CancellationToken)

View Source
Declaration
Task<long> InsertAndGetLastInsertIdAsync<T>(IDbCommand dbCmd, CancellationToken token)
Returns

Task<System.Int64>

Parameters
TypeName
IDbCommanddbCmd
CancellationTokentoken
Type Parameters
  • T

GetLoadChildrenSubSelect<From>(SqlExpression<From>)

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

System.String

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

ToRowCountStatement(String)

View Source
Declaration
string ToRowCountStatement(string innerSql)
Returns

System.String

Parameters
TypeName
System.StringinnerSql

ToUpdateStatement<T>(IDbCommand, T, ICollection<String>)

View Source
Declaration
string ToUpdateStatement<T>(IDbCommand dbCmd, T item, ICollection<string> updateFields = null)
Returns

System.String

Parameters
TypeName
IDbCommanddbCmd
<T>item
ICollection<System.String>updateFields
Type Parameters
  • T

ToInsertStatement<T>(IDbCommand, T, ICollection<String>)

View Source
Declaration
string ToInsertStatement<T>(IDbCommand dbCmd, T item, ICollection<string> insertFields = null)
Returns

System.String

Parameters
TypeName
IDbCommanddbCmd
<T>item
ICollection<System.String>insertFields
Type Parameters
  • T

MergeParamsIntoSql(String, IEnumerable<IDbDataParameter>)

View Source
Declaration
string MergeParamsIntoSql(string sql, IEnumerable<IDbDataParameter> dbParams)
Returns

System.String

Parameters
TypeName
System.Stringsql
IEnumerable<IDbDataParameter>dbParams

GetRefSelfSql<From>(SqlExpression<From>, ModelDefinition, FieldDefinition, ModelDefinition)

View Source
Declaration
string GetRefSelfSql<From>(SqlExpression<From> refQ, ModelDefinition modelDef, FieldDefinition refSelf, ModelDefinition refModelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.SqlExpression<T>refQ
ServiceStack.OrmLite.ModelDefinitionmodelDef
ServiceStack.OrmLite.FieldDefinitionrefSelf
ServiceStack.OrmLite.ModelDefinitionrefModelDef
Type Parameters
  • From

GetRefFieldSql(String, ModelDefinition, FieldDefinition)

View Source
Declaration
string GetRefFieldSql(string subSql, ModelDefinition refModelDef, FieldDefinition refField)
Returns

System.String

Parameters
TypeName
System.StringsubSql
ServiceStack.OrmLite.ModelDefinitionrefModelDef
ServiceStack.OrmLite.FieldDefinitionrefField

GetFieldReferenceSql(String, FieldDefinition, FieldReference)

View Source
Declaration
string GetFieldReferenceSql(string subSql, FieldDefinition fieldDef, FieldReference fieldRef)
Returns

System.String

Parameters
TypeName
System.StringsubSql
ServiceStack.OrmLite.FieldDefinitionfieldDef
ServiceStack.OrmLite.FieldReferencefieldRef

ToTableNamesStatement(String)

View Source
Declaration
string ToTableNamesStatement(string schema)
Returns

System.String

Parameters
TypeName
System.Stringschema

ToTableNamesWithRowCountsStatement(Boolean, String)

Return table, row count SQL for listing all tables with their row counts

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

System.String

Parameters
TypeNameDescription
System.BooleanliveIf 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)

View Source
Declaration
string SqlConflict(string sql, string conflictResolution)
Returns

System.String

Parameters
TypeName
System.Stringsql
System.StringconflictResolution

SqlConcat(IEnumerable<Object>)

View Source
Declaration
string SqlConcat(IEnumerable<object> args)
Returns

System.String

Parameters
TypeName
IEnumerable<System.Object>args

SqlCurrency(String)

View Source
Declaration
string SqlCurrency(string fieldOrValue)
Returns

System.String

Parameters
TypeName
System.StringfieldOrValue

SqlCurrency(String, String)

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

System.String

Parameters
TypeName
System.StringfieldOrValue
System.StringcurrencySymbol

SqlBool(Boolean)

View Source
Declaration
string SqlBool(bool value)
Returns

System.String

Parameters
TypeName
System.Booleanvalue

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

View Source
Declaration
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
string SqlCast(object fieldOrValue, string castAs)
Returns

System.String

Parameters
TypeName
System.ObjectfieldOrValue
System.StringcastAs

GenerateComment(in String)

Generates a SQL comment.

View Source
Declaration
string GenerateComment(in string text)
Returns

System.String: The generated SQL.

Parameters
TypeNameDescription
System.StringtextThe comment text.

|