Method Retrieve
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Retrieve(IExecuteReader)
Iterates all records within the first result set using an IDataReader and returns the results. DBNull values are left unchanged (retained).
public static QueryResultQueue<object[]> Retrieve(this IExecuteReader command)
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
Returns
- QueryResultQueue<object[]>
The QueryResult that contains all the results and the column mappings.
Retrieve(IExecuteReader, IEnumerable<int>)
Iterates all records within the current result set using an IDataReader and returns the desired results. DBNull values are left unchanged (retained).
public static QueryResultQueue<object[]> Retrieve(this IExecuteReader command, IEnumerable<int> ordinals)
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
ordinalsIEnumerable<int>The ordinals to request from the reader for each record.
Returns
- QueryResultQueue<object[]>
The QueryResult that contains all the results and the column mappings.
Retrieve(IExecuteReader, int, params IEnumerable<int>)
Iterates all records within the current result set using an IDataReader and returns the desired results. DBNull values are left unchanged (retained).
public static QueryResultQueue<object[]> Retrieve(this IExecuteReader command, int n, params IEnumerable<int> others)
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
nintThe first ordinal to include in the request to the reader for each record.
othersIEnumerable<int>The remaining ordinals to request from the reader for each record.
Returns
- QueryResultQueue<object[]>
The QueryResult that contains all the results and the column mappings.
Retrieve(IExecuteReader, IEnumerable<string>)
Iterates all records within the first result set using an IDataReader and returns the desired results as a list of Dictionaries containing only the specified column values. DBNull values are left unchanged (retained).
public static QueryResultQueue<object[]> Retrieve(this IExecuteReader command, IEnumerable<string> columnNames)
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
columnNamesIEnumerable<string>The column names to select.
Returns
- QueryResultQueue<object[]>
The QueryResult that contains all the results and the column mappings.
Retrieve(IExecuteReader, string, params IEnumerable<string>)
Iterates all records within the current result set using an IDataReader and returns the desired results. DBNull values are left unchanged (retained).
public static QueryResultQueue<object[]> Retrieve(this IExecuteReader command, string c, params IEnumerable<string> others)
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
cstringThe first column name to include in the request to the reader for each record.
othersIEnumerable<string>The remaining column names to request from the reader for each record.
Returns
- QueryResultQueue<object[]>
The QueryResult that contains all the results and the column mappings.