Dedicated database operations. Most services that need to interact with a database should be using the methods exposed by this operator. More...
Public Member Functions | |
T | Query< T > (string query, IDictionary< string, object > parameters) |
Execute a query expected to return a single result. More... | |
T | Query< T > (string query, IQueryParameterSource parameterSource=null) |
Execute a query expected to return a single result. More... | |
T | Query< T > (ParsedQuery query, IQueryParameterSource parameterSource=null) |
Execute a query exepcted to return a single result. More... | |
void | Select (string query, RowHandler rowHandler, IDictionary< string, object > parameters) |
Executes a select query using a DataAdapter. A row handler is run on each returned row. More... | |
IList< T > | Select< T > (string query, RowMapper< T > mapper, IDictionary< string, object > parameters) |
Executes a select query using a DataAdapter and returns a list of objects using the provided row mapper. More... | |
IList< T > | Select< T > (string query, RowMapper< T > mapper, IQueryParameterSource parameterSource) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor. More... | |
T | Select< T > (string query, DataReaderExtractor< T > extractor, IDictionary< string, object > parameters) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor. More... | |
T | Select< T > (string query, DataReaderExtractor< T > extractor, IQueryParameterSource parameterSource=null) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor. More... | |
T | Select< T > (ParsedQuery query, DataReaderExtractor< T > extractor, IQueryParameterSource parameterSource=null) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor. More... | |
DataSet | Select (string query, IQueryParameterSource parameterSource=null) |
Executes a select query using a DbDataAdapter and returns a DataSet. More... | |
DataSet | Select (ParsedQuery query, IQueryParameterSource parameterSource=null) |
Executes a select query using a DbDataAdapter and returns a DataSet. More... | |
int | Update (string query, IDictionary< string, object > parameters) |
Executes an insert or update query on a database. More... | |
int | Update (string query, IQueryParameterSource parameterSource=null) |
Executes an insert or update query on a database. More... | |
int | Update (ParsedQuery query, IQueryParameterSource parameterSource=null) |
Executes an insert or update query on a database. More... | |
int[] | BatchUpdate (string query, IList< IDictionary< string, object >> parameters) |
Executes an insert or update command multiple times. More... | |
int[] | BatchUpdate (string query, IList< IQueryParameterSource > parameterSources) |
Executes an insert or update command multiple times. More... | |
int[] | BatchUpdate (ParsedQuery query, IList< IQueryParameterSource > parameterSources) |
Executes an insert or update command multiple times. More... | |
Properties | |
IConnectionProvider | ConnectionProvider [get, set] |
The IConnectionProvider to use to get the connections. More... | |
Detailed Description
Dedicated database operations. Most services that need to interact with a database should be using the methods exposed by this operator.
Member Function Documentation
int [] Summer.Batch.Data.DbOperator.BatchUpdate | ( | string | query, |
IList< IDictionary< string, object >> | parameters | ||
) |
Executes an insert or update command multiple times.
- Parameters
-
query the query to execute parameters a list containing the parameters for each execution of the query
- Returns
- an array containing the affected rows for each execution
int [] Summer.Batch.Data.DbOperator.BatchUpdate | ( | string | query, |
IList< IQueryParameterSource > | parameterSources | ||
) |
Executes an insert or update command multiple times.
- Parameters
-
query the query to execute parameterSources a list containing a IQueryParameterSource for each execution
- Returns
- an array containing the affected rows for each execution
int [] Summer.Batch.Data.DbOperator.BatchUpdate | ( | ParsedQuery | query, |
IList< IQueryParameterSource > | parameterSources | ||
) |
Executes an insert or update command multiple times.
- Parameters
-
query the parsed query to execute parameterSources a list containing a IQueryParameterSource for each execution
- Returns
- an array containing the affected rows for each execution
T Summer.Batch.Data.DbOperator.Query< T > | ( | string | query, |
IDictionary< string, object > | parameters | ||
) |
Execute a query expected to return a single result.
- Template Parameters
-
T the type of the result
- Parameters
-
query the SQL query parameters the parameters of the query
- Returns
- the result of the query
T Summer.Batch.Data.DbOperator.Query< T > | ( | string | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Execute a query expected to return a single result.
- Template Parameters
-
T the type of the result
- Parameters
-
query the SQL query parameterSource a parameter source that holds the parameter values for the query
- Returns
- the result of the query
T Summer.Batch.Data.DbOperator.Query< T > | ( | ParsedQuery | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Execute a query exepcted to return a single result.
- Template Parameters
-
T the type of the result
- Parameters
-
query the parsed query parameterSource a parameter source that holds the parameter values for the query
- Returns
- the result of the query
void Summer.Batch.Data.DbOperator.Select | ( | string | query, |
RowHandler | rowHandler, | ||
IDictionary< string, object > | parameters | ||
) |
Executes a select query using a DataAdapter. A row handler is run on each returned row.
- Parameters
-
query the SQL query rowHandler a mapper that will be executed on each returned row parameters the parameters of the query
DataSet Summer.Batch.Data.DbOperator.Select | ( | string | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Executes a select query using a DbDataAdapter and returns a DataSet.
- Parameters
-
query the query parameterSource a parameter source that holds the parameter values for the query
- Returns
- a data set filled using the query
DataSet Summer.Batch.Data.DbOperator.Select | ( | ParsedQuery | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Executes a select query using a DbDataAdapter and returns a DataSet.
- Parameters
-
query the parsed query parameterSource a parameter source that holds the parameter values for the query
- Returns
- a data set filled using the query
IList<T> Summer.Batch.Data.DbOperator.Select< T > | ( | string | query, |
RowMapper< T > | mapper, | ||
IDictionary< string, object > | parameters | ||
) |
Executes a select query using a DataAdapter and returns a list of objects using the provided row mapper.
- Template Parameters
-
T the type of the elements to return
- Parameters
-
query the SQL query mapper the row mapper responsible for creating the returned elements parameters the parameters of the query
- Returns
- a list of T elements obtained by executing the query
IList<T> Summer.Batch.Data.DbOperator.Select< T > | ( | string | query, |
RowMapper< T > | mapper, | ||
IQueryParameterSource | parameterSource | ||
) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor.
- Template Parameters
-
T the type of the elements to return
- Parameters
-
query the SQL query mapper the row mapper responsible for creating the returned elements parameterSource a parameter source that holds the parameter values for the query
- Returns
- a list of T elements obtained by executing the query
T Summer.Batch.Data.DbOperator.Select< T > | ( | string | query, |
DataReaderExtractor< T > | extractor, | ||
IDictionary< string, object > | parameters | ||
) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor.
- Template Parameters
-
T the type of the data to return
- Parameters
-
query the SQL query extractor the data reader mapper used to extract data parameters the parameters of the query
- Returns
- the extracted data
T Summer.Batch.Data.DbOperator.Select< T > | ( | string | query, |
DataReaderExtractor< T > | extractor, | ||
IQueryParameterSource | parameterSource = null |
||
) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor.
- Template Parameters
-
T the type of the data to return
- Parameters
-
query the SQL query extractor the data reader mapper used to extract data parameterSource a parameter source that holds the parameter values for the query
- Returns
- the extracted data
T Summer.Batch.Data.DbOperator.Select< T > | ( | ParsedQuery | query, |
DataReaderExtractor< T > | extractor, | ||
IQueryParameterSource | parameterSource = null |
||
) |
Executes a select query using a DataAdapter and returns data using the provided data reader extractor.
- Template Parameters
-
T the type of the data to return
- Parameters
-
query the parsed query extractor the data reader mapper used to extract data parameterSource a parameter source that holds the parameter values for the query
- Returns
- the extracted data
int Summer.Batch.Data.DbOperator.Update | ( | string | query, |
IDictionary< string, object > | parameters | ||
) |
Executes an insert or update query on a database.
- Parameters
-
query the query to execute parameters the parameters of the query
- Returns
- the number of affected rows
int Summer.Batch.Data.DbOperator.Update | ( | string | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Executes an insert or update query on a database.
- Parameters
-
query the query to execute parameterSource a parameter source that holds the parameter values for the query
- Returns
- the number of affected rows
int Summer.Batch.Data.DbOperator.Update | ( | ParsedQuery | query, |
IQueryParameterSource | parameterSource = null |
||
) |
Executes an insert or update query on a database.
- Parameters
-
query the parsed query parameterSource a parameter source that holds the parameter values for the query
- Returns
- the number of affected rows
Property Documentation
|
getset |
The IConnectionProvider to use to get the connections.
The documentation for this class was generated from the following file:
- Summer.Batch.Data/DbOperator.cs