C# Class SqlFu.Providers.DbProvider

Inheritance: IDbProvider
Show file Open project: sapiens/SqlFu

Protected Properties

Property Type Description
Converters IManageConverters
InitExpressionHelper Func

Public Methods

Method Description
AddReturnInsertValue ( string sqlValues, string identityColumn ) : string
CreateConnection ( ) : DbConnection
Escape ( string s, char startId, char endId ) : string
EscapeIdentifier ( string name ) : string
EscapeTableName ( TableName table ) : string
FormatIndexOptions ( string idxDef, string options = "" ) : string
FormatParameters ( string sql, string paramNames ) : string
FormatQueryPagination ( string sql, Pagination page, ParametersManager pm ) : string
GetColumnType ( Type type ) : string
GetIdentityKeyword ( ) : string
IsDbBusy ( DbException ex ) : bool
IsUniqueViolation ( DbException ex, string keyName = "" ) : bool
ObjectExists ( DbException ex, string name = null ) : bool
OnCommandExecuting ( DbCommand cmd ) : void
ReplaceExpressionsProvider ( IDbProviderExpressions prov ) : void
SetupParameter ( DbParameter param, string name, object value ) : void

Protected Methods

Method Description
DbProvider ( Func factory, string providerId, SqlFuConfig config = null ) : System
GetEscapeIdentifierChars ( ) : EscapeIdentifierChars
InitTools ( ) : IDatabaseTools

Method Details

AddReturnInsertValue() public abstract method

public abstract AddReturnInsertValue ( string sqlValues, string identityColumn ) : string
sqlValues string
identityColumn string
return string

CreateConnection() public method

public CreateConnection ( ) : DbConnection
return System.Data.Common.DbConnection

DbProvider() protected method

protected DbProvider ( Func factory, string providerId, SqlFuConfig config = null ) : System
factory Func
providerId string
config SqlFuConfig
return System

Escape() public static method

public static Escape ( string s, char startId, char endId ) : string
s string
startId char
endId char
return string

EscapeIdentifier() public method

public EscapeIdentifier ( string name ) : string
name string
return string

EscapeTableName() public method

public EscapeTableName ( TableName table ) : string
table TableName
return string

FormatIndexOptions() public method

public FormatIndexOptions ( string idxDef, string options = "" ) : string
idxDef string
options string
return string

FormatParameters() public method

public FormatParameters ( string sql, string paramNames ) : string
sql string
paramNames string
return string

FormatQueryPagination() public abstract method

public abstract FormatQueryPagination ( string sql, Pagination page, ParametersManager pm ) : string
sql string
page Pagination
pm ParametersManager
return string

GetColumnType() public abstract method

public abstract GetColumnType ( Type type ) : string
type System.Type
return string

GetEscapeIdentifierChars() protected abstract method

protected abstract GetEscapeIdentifierChars ( ) : EscapeIdentifierChars
return EscapeIdentifierChars

GetIdentityKeyword() public abstract method

public abstract GetIdentityKeyword ( ) : string
return string

InitTools() protected abstract method

protected abstract InitTools ( ) : IDatabaseTools
return IDatabaseTools

IsDbBusy() public abstract method

public abstract IsDbBusy ( DbException ex ) : bool
ex System.Data.Common.DbException
return bool

IsUniqueViolation() public abstract method

public abstract IsUniqueViolation ( DbException ex, string keyName = "" ) : bool
ex System.Data.Common.DbException
keyName string
return bool

ObjectExists() public abstract method

public abstract ObjectExists ( DbException ex, string name = null ) : bool
ex System.Data.Common.DbException
name string
return bool

OnCommandExecuting() public method

public OnCommandExecuting ( DbCommand cmd ) : void
cmd System.Data.Common.DbCommand
return void

ReplaceExpressionsProvider() public method

public ReplaceExpressionsProvider ( IDbProviderExpressions prov ) : void
prov IDbProviderExpressions
return void

SetupParameter() public method

public SetupParameter ( DbParameter param, string name, object value ) : void
param System.Data.Common.DbParameter
name string
value object
return void

Property Details

Converters protected property

protected IManageConverters Converters
return IManageConverters

InitExpressionHelper protected property

protected Func InitExpressionHelper
return Func