C# Класс Adf.Base.Data.DictionaryQueryHandler

Repesents a service handler that is dependent to the use of DictionaryState for database tranaction. Provides the actual database handling for Select, Delete, Insert and Update data. Uses a timestamp to check for concurrency. Warning: @@DBTS is used to get the new timestamp after insert or update. Be aware that this works only in the current database, so a view to a diffentent database is not supported!
Наследование: IAdfQueryHandler
Показать файл Открыть проект

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

Метод Описание
Delete ( IAdfQuery query ) : int
New ( IAdfQuery query ) : IInternalState

Create a new data row of IInternalState to insert new data into database.

Run ( IAdfQuery query ) : IInternalState

Executes a specified IAdfQuery statement and returns the affected row of data.

RunAndSplit ( IAdfQuery query ) : IEnumerable

Executes the specified query and return the result, where each row in the result is stored in an instance of IInternalState.

RunScalar ( IAdfQuery query ) : object

Executes the IAdfQuery, and returns the first column of the first row in the resultset returned by the IAdfQuery. Extra columns or rows are ignored.

Save ( IAdfQuery query, IInternalState data ) : bool

Save the specified data of IInternalState into database.

Защищенные методы

Метод Описание
RunSave ( DictionaryState state, IAdfQuery query ) : bool

Executes a query

Приватные методы

Метод Описание
CreateState ( ColumnDescriber>.Dictionary describers, System.Data.SqlClient.SqlDataReader reader = null ) : IInternalState
GetSchema ( IAdfQuery query, System.Data.SqlClient.SqlDataReader reader = null ) : ColumnDescriber>.Dictionary
RunQuery ( IAdfQuery query ) : IEnumerable

Runs the specified IAdfQuery.

Описание методов

Delete() публичный Метод

public Delete ( IAdfQuery query ) : int
query IAdfQuery
Результат int

New() публичный Метод

Create a new data row of IInternalState to insert new data into database.
public New ( IAdfQuery query ) : IInternalState
query IAdfQuery The that defines the datasource name and query statement.
Результат IInternalState

Run() публичный Метод

Executes a specified IAdfQuery statement and returns the affected row of data.
public Run ( IAdfQuery query ) : IInternalState
query IAdfQuery The that defines the datasource name and query statement.
Результат IInternalState

RunAndSplit() публичный Метод

Executes the specified query and return the result, where each row in the result is stored in an instance of IInternalState.
public RunAndSplit ( IAdfQuery query ) : IEnumerable
query IAdfQuery The that defines the datasource name and query statement.
Результат IEnumerable

RunSave() защищенный Метод

Executes a query
protected RunSave ( DictionaryState state, IAdfQuery query ) : bool
state DictionaryState
query IAdfQuery
Результат bool

RunScalar() публичный Метод

Executes the IAdfQuery, and returns the first column of the first row in the resultset returned by the IAdfQuery. Extra columns or rows are ignored.
The current state of the connection is closed.
public RunScalar ( IAdfQuery query ) : object
query IAdfQuery The that defines the datasource name and query statement.
Результат object

Save() публичный Метод

Save the specified data of IInternalState into database.
The current state of the connection is closed. An attempt to execute an INSERT, UPDATE, or DELETE statement resulted in zero records affected.
public Save ( IAdfQuery query, IInternalState data ) : bool
query IAdfQuery The that defines the datasource name and query statement.
data IInternalState The data of that needs to be saved.
Результат bool