C# Класс Habanero.DB.DatabaseConnectionSqlServer

A database connection customised for the SqlServer database
Наследование: DatabaseConnection
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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