Table of Contents

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

reader IDataReader

The 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

reader IDataReader

The IDataReader to read results from.

ordinals IEnumerable<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

reader IDataReader

The IDataReader to read results from.

n int

The first ordinal to include in the request to the reader for each record.

others IEnumerable<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

reader IDataReader

The IDataReader to read results from.

columnNames IEnumerable<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

reader IDataReader

The IDataReader to read results from.

c string

The first column name to include in the request to the reader for each record.

others IEnumerable<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

command IDbCommand

The IDbCommand to generate the reader from.

behavior CommandBehavior

The 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

command IDbCommand

The IDbCommand to generate the reader from.

ordinals IEnumerable<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

command IDbCommand

The IDbCommand to generate the reader from.

n int

The first ordinal to include in the request to the reader for each record.

others IEnumerable<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

command IDbCommand

The IDbCommand to generate the reader from.

columnNames IEnumerable<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

command IDbCommand

The IDbCommand to generate the reader from.

c string

The first column name to include in the request to the reader for each record.

others IEnumerable<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.