Namespaces

Types

Type DriverBase

Namespace NHibernate.Driver

Interfaces IDriver, ISqlParameterFormatter

Methods

Properties

Public instance methods

void Configure(IDictionary settings)

Parameters
IDictionary settings

IBatcher CreateBatcher(ConnectionManager connectionManager)

Create an instance of IBatcher according to the configuration and the capabilities of the driver
By default, .Net doesn't have any batching capabilities, drivers that does have batching support need to override this method and return their own batcher.
Parameters
return IBatcher
ConnectionManager connectionManager

IDbCommand CreateCommand()

Parameters
return IDbCommand

IDbConnection CreateConnection()

Parameters
return IDbConnection

bool Equals(object obj)

Parameters
return bool
object obj

string FormatNameForParameter(string parameterName)

Changes the parameterName into the correct format for an IDbParameter for the Driver.
For SqlServerConnectionProvider it will change id to @id
Parameters
return string A parameter formatted for an IDbParameter.
string parameterName The unformatted name of the parameter

string FormatNameForSql(string parameterName)

Change the parameterName into the correct format IDbCommand.CommandText for the ConnectionProvider
Parameters
return string A parameter formatted for an IDbCommand.CommandText
string parameterName The unformatted name of the parameter

IDbCommand GenerateCommand(CommandType type, SqlString sqlString, SqlType[] parameterTypes)

Parameters
return IDbCommand
CommandType type
SqlString sqlString
SqlType[] parameterTypes

IDbDataParameter GenerateOutputParameter(IDbCommand command)

Parameters
return IDbDataParameter
IDbCommand command

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

void PrepareCommand(IDbCommand command)

Parameters
IDbCommand command

string ToString()

Parameters
return string

Public properties

string NamedPrefix get;

The Named Prefix for parameters.
Sql Server uses "@" and Oracle uses ":" .
return string

bool SupportsMultipleOpenReaders get;

return bool

bool SupportsMultipleQueries get;

return bool

bool UseNamedPrefixInParameter get;

Does this Driver require the use of the Named Prefix when trying to reference the Parameter in the Command's Parameter collection.
This is really only useful when the UseNamedPrefixInSql == true. When this is true the code will look like: IDbParameter param = cmd.Parameters["@paramName"] if this is false the code will be IDbParameter param = cmd.Parameters["paramName"] .
return bool

bool UseNamedPrefixInSql get;

Does this Driver require the use of a Named Prefix in the SQL statement.
For example, SqlClient requires select * from simple where simple_id = @simple_id If this is false, like with the OleDb provider, then it is assumed that the ? can be a placeholder for the parameter in the SQL statement.
return bool