Table of Contents

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

command IExecuteReader

The 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

command IExecuteReader

The IExecuteReader to iterate.

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

command IExecuteReader

The IExecuteReader to iterate.

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

command IExecuteReader

The IExecuteReader to iterate.

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

command IExecuteReader

The IExecuteReader to iterate.

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 QueryResult that contains all the results and the column mappings.