Implementation of T:IItemReader that reads items from a database using a DbDataReader. It creates its own connection as it will be busy until the reader is closed.
More...
|
| DataReaderItemReader () |
| Default constructor. More...
|
|
void | AfterPropertiesSet () |
| See IInitializationPostOperations.AfterPropertiesSet. More...
|
|
override T | Read () |
| Reads a piece of input data and advance to the next one. Implementations must return null at the end of the input data set. In a transactional setting, caller might get the same item twice from successive calls (or otherwise), if the first call was in a transaction that rolled back. More...
|
|
override void | Open (ExecutionContext executionContext) |
| Open the stream for the provided ExecutionContext. More...
|
|
override void | Close () |
| If any resources are needed for the stream to operate they need to be destroyed here. Once this method has been called all other methods (except open) may throw an exception. More...
|
|
override void | Update (ExecutionContext executionContext) |
| Indicates that the execution context provided during open is about to be saved. If any state is remaining, but has not been put in the context, it should be added here. More...
|
|
virtual void | Flush () |
| Flushes the stream. More...
|
|
string | GetExecutionContextKey (string key) |
| Transform the given key to use the name of this instance as prefix. More...
|
|
virtual void | Dispose () |
|
|
ConnectionStringSettings | ConnectionString [get, set] |
| A ConnectionString that holds the information on the connection to use More...
|
|
string | Query [get, set] |
| The sql query to execute for creating the data reader. More...
|
|
IQueryParameterSource | ParameterSource [get, set] |
| Source for the parameter values. More...
|
|
RowMapper< T > | RowMapper [get, set] |
| Mapper that creates the items from the data reader. More...
|
|
int | CurrentItemCount [protected get, set] |
| The index of the item to start reading from. If the execution context contains a key [name].read.count (where [name] is the name of this component), the value from the execution context will be used instead. More...
|
|
int | MaxItemCount [set] |
| The maximum index of the items to be read. If the execution context contains a key [name].read.count.max (where [name] is the name of this component), the value from the execution context will be used instead. More...
|
|
bool | SaveState [get, set] |
| Flat that determines whether to save internal data in the execution context. Default value is true. Switch to false if you don't want to save any state from this stream or you don't want it to be restartable. More...
|
|
string | Name [set] |
| The name of the component that will be used as prefix for keys in the execution context. More...
|
|
Implementation of T:IItemReader that reads items from a database using a DbDataReader. It creates its own connection as it will be busy until the reader is closed.
- Template Parameters
-
T | the type of the read elements |