C# 클래스 Habanero.DB.DatabaseConnectionSqlServer

A database connection customised for the SqlServer database
상속: DatabaseConnection
파일 보기 프로젝트 열기: Chillisoft/habanero 1 사용 예제들

공개 메소드들

메소드 설명
CreateParameterNameGenerator ( ) : IParameterNameGenerator

Creates an IParameterNameGenerator for this database connection. This is used to create names for parameters added to an ISqlStatement because each database uses a different naming convention for their parameters.

DatabaseConnectionSqlServer ( string assemblyName, string className ) : System

Constructor to initialise the connection object with an assembly name and class name

DatabaseConnectionSqlServer ( string assemblyName, string className, string connectString ) : System

Constructor to initialise the connection object with an assembly name, class name and connection string

GetLastAutoIncrementingID ( string tableName, IDbTransaction tran, IDbCommand command ) : long

Gets the value of the last auto-incrementing number. This called after doing an insert statement so that the inserted auto-number can be retrieved. The table name, current IDbTransaction and IDbCommand are passed in so that they can be used if necessary.

보호된 메소드들

메소드 설명
SetupCommand ( ISqlStatement statement, IDbCommand command, IDbTransaction transaction ) : void

비공개 메소드들

메소드 설명
CreateIdentityOutputParameter ( IDbCommand command ) : IDbDataParameter
IsAutoIncrementingInsertStatement ( ISqlStatement statement ) : bool
SetupCommandForAutoIncrement ( IDbCommand command ) : void

메소드 상세

CreateParameterNameGenerator() 공개 메소드

Creates an IParameterNameGenerator for this database connection. This is used to create names for parameters added to an ISqlStatement because each database uses a different naming convention for their parameters.
public CreateParameterNameGenerator ( ) : IParameterNameGenerator
리턴 IParameterNameGenerator

DatabaseConnectionSqlServer() 공개 메소드

Constructor to initialise the connection object with an assembly name and class name
public DatabaseConnectionSqlServer ( string assemblyName, string className ) : System
assemblyName string The assembly name
className string The class name
리턴 System

DatabaseConnectionSqlServer() 공개 메소드

Constructor to initialise the connection object with an assembly name, class name and connection string
public DatabaseConnectionSqlServer ( string assemblyName, string className, string connectString ) : System
assemblyName string The assembly name
className string The class name
connectString string The connection string, which can be /// generated using ConnectionStringSqlServerFactory.CreateConnectionString() ///
리턴 System

GetLastAutoIncrementingID() 공개 메소드

Gets the value of the last auto-incrementing number. This called after doing an insert statement so that the inserted auto-number can be retrieved. The table name, current IDbTransaction and IDbCommand are passed in so that they can be used if necessary.
public GetLastAutoIncrementingID ( string tableName, IDbTransaction tran, IDbCommand command ) : long
tableName string The name of the table inserted into
tran IDbTransaction The current transaction, the one the insert was done in
command IDbCommand The Command the did the insert statement
리턴 long

SetupCommand() 보호된 메소드

protected SetupCommand ( ISqlStatement statement, IDbCommand command, IDbTransaction transaction ) : void
statement ISqlStatement
command IDbCommand
transaction IDbTransaction
리턴 void