C# Класс Adf.Data.DatabaseQueryHandler

Repesents a service handler that is dependent to the use of RowState for database tranaction. Provides the actual database handling for Select, Delete, Insert and Update data.
Наследование: 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.

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

Метод Описание
IsResultEmpty ( DataSet set ) : bool

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

Метод Описание
RunQuery ( IAdfQuery query ) : DataSet

Runs the specified IAdfQuery and get the executed result set into a System.Data.DataSet.

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

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

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

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

protected IsResultEmpty ( DataSet set ) : bool
set System.Data.DataSet
Результат bool

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

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