C# Class MicroLite.Driver.DbDriver

The base class for implementations of IDbDriver.
Inheritance: IDbDriver
Show file Open project: TrevorPilley/MicroLite

Public Methods

Method Description
Combine ( IEnumerable sqlQueries ) : SqlQuery

Combines the specified SQL queries into a single SqlQuery.

Combine ( SqlQuery sqlQuery1, SqlQuery sqlQuery2 ) : SqlQuery

Combines the specified SQL queries into a single SqlQuery.

CreateConnection ( ) : IDbConnection

Creates an IDbConnection to the database.

Protected Methods

Method Description
BuildParameter ( IDbDataParameter parameter, string parameterName, SqlArgument sqlArgument ) : void

Builds the the IDbDataParameter using the specified name and value.

DbDriver ( SqlCharacters sqlCharacters ) : System

Initialises a new instance of the DbDriver class.

GetCommandText ( string commandText ) : string

Gets the command text.

GetCommandType ( string commandText ) : CommandType

Gets the type of the command.

IsStoredProcedureCall ( string commandText ) : bool

Determines whether the command text is a stored procedure call.

Private Methods

Method Description
BuildCommand ( IDbCommand command, SqlQuery sqlQuery ) : void

Method Details

BuildParameter() protected method

Builds the the IDbDataParameter using the specified name and value.
protected BuildParameter ( IDbDataParameter parameter, string parameterName, SqlArgument sqlArgument ) : void
parameter IDbDataParameter The parameter to build.
parameterName string The name for the parameter.
sqlArgument SqlArgument The for the parameter.
return void

Combine() public method

Combines the specified SQL queries into a single SqlQuery.
public Combine ( IEnumerable sqlQueries ) : SqlQuery
sqlQueries IEnumerable The SQL queries to be combined.
return SqlQuery

Combine() public method

Combines the specified SQL queries into a single SqlQuery.
public Combine ( SqlQuery sqlQuery1, SqlQuery sqlQuery2 ) : SqlQuery
sqlQuery1 SqlQuery The first SQL query to be combined.
sqlQuery2 SqlQuery The second SQL query to be combined.
return SqlQuery

CreateConnection() public method

Creates an IDbConnection to the database.
public CreateConnection ( ) : IDbConnection
return IDbConnection

DbDriver() protected method

Initialises a new instance of the DbDriver class.
protected DbDriver ( SqlCharacters sqlCharacters ) : System
sqlCharacters SqlCharacters The SQL characters.
return System

GetCommandText() protected method

Gets the command text.
protected GetCommandText ( string commandText ) : string
commandText string The command text.
return string

GetCommandType() protected method

Gets the type of the command.
protected GetCommandType ( string commandText ) : CommandType
commandText string The command text.
return CommandType

IsStoredProcedureCall() protected method

Determines whether the command text is a stored procedure call.
protected IsStoredProcedureCall ( string commandText ) : bool
commandText string The command text to inspect.
return bool