Method Retrieve
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Retrieve(IDataReader)
Iterates all records within the current result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDataReader reader)
Parameters
readerIDataReaderThe IDataReader to read results from.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
Retrieve(IDataReader, IEnumerable<int>)
Iterates all records within the current result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDataReader reader, IEnumerable<int> ordinals)
Parameters
readerIDataReaderThe IDataReader to read results from.
ordinalsIEnumerable<int>The ordinals to request from the reader for each record.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
Retrieve(IDataReader, int, params IEnumerable<int>)
Iterates all records within the current result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDataReader reader, int n, params IEnumerable<int> others)
Parameters
readerIDataReaderThe IDataReader to read results from.
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 query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
Retrieve(IDataReader, IEnumerable<string>)
Iterates all records within the current result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDataReader reader, IEnumerable<string> columnNames)
Parameters
readerIDataReaderThe IDataReader to read results from.
columnNamesIEnumerable<string>The column names to select.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
Retrieve(IDataReader, string, params IEnumerable<string>)
Iterates all records within the current result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDataReader reader, string c, params IEnumerable<string> others)
Parameters
readerIDataReaderThe IDataReader to read results from.
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 query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
Retrieve(IDbCommand, CommandBehavior)
Executes a reader and iterates all records within the remaining result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDbCommand command, CommandBehavior behavior = CommandBehavior.Default)
Parameters
commandIDbCommandThe IDbCommand to generate the reader from.
behaviorCommandBehaviorThe CommandBehavior flags to use with the data reader.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
The default behavior will open a connection, execute the reader and close the connection it if was not already open.
Retrieve(IDbCommand, IEnumerable<int>)
Executes a reader and iterates all records within the remaining result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDbCommand command, IEnumerable<int> ordinals)
Parameters
commandIDbCommandThe IDbCommand to generate the reader from.
ordinalsIEnumerable<int>The ordinals to request from the reader for each record.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
The default behavior will open a connection, execute the reader and close the connection it if was not already open.
Retrieve(IDbCommand, int, params IEnumerable<int>)
Executes a reader and iterates all records within the remaining result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDbCommand command, int n, params IEnumerable<int> others)
Parameters
commandIDbCommandThe IDbCommand to generate the reader from.
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 query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
The default behavior will open a connection, execute the reader and close the connection it if was not already open.
Retrieve(IDbCommand, IEnumerable<string>)
Executes a reader and iterates all records within the remaining result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDbCommand command, IEnumerable<string> columnNames)
Parameters
commandIDbCommandThe IDbCommand to generate the reader from.
columnNamesIEnumerable<string>The column names to select.
Returns
- QueryResultQueue<object[]>
The query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
The default behavior will open a connection, execute the reader and close the connection it if was not already open.
Retrieve(IDbCommand, string, params IEnumerable<string>)
Executes a reader and iterates all records within the remaining result set using an IDataReader and returns the desired results.
public static QueryResultQueue<object[]> Retrieve(this IDbCommand command, string c, params IEnumerable<string> others)
Parameters
commandIDbCommandThe IDbCommand to generate the reader from.
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 query result that contains all the results and the column mappings.
Remarks
DBNull values are left unchanged (retained).
The default behavior will open a connection, execute the reader and close the connection it if was not already open.