Table of Contents

Method RetrieveAsync

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

RetrieveAsync(DbDataReader, bool, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

reader DbDataReader

The DbDataReader to read results from.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, CancellationToken cancellationToken)

Parameters

reader DbDataReader

The DbDataReader to read results from.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, IEnumerable<int>, bool, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, IEnumerable<int> ordinals, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

reader DbDataReader

The reader to enumerate.

ordinals IEnumerable<int>

The limited set of ordinals to include. If none are specified, the returned objects will be empty.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, IEnumerable<int>, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, IEnumerable<int> ordinals, CancellationToken cancellationToken)

Parameters

reader DbDataReader

The reader to enumerate.

ordinals IEnumerable<int>

The limited set of ordinals to include. If none are specified, the returned objects will be empty.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, int, params IEnumerable<int>)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, int n, params IEnumerable<int> others)

Parameters

reader DbDataReader

The reader to enumerate.

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

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, CancellationToken, int, params IEnumerable<int>)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, CancellationToken cancellationToken, int n, params IEnumerable<int> others)

Parameters

reader DbDataReader

The reader to enumerate.

cancellationToken CancellationToken

A cancellation token.

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

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, IEnumerable<string>, bool, bool, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, IEnumerable<string> columnNames, bool normalizeColumnOrder = false, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

reader DbDataReader

The DbDataReader to read results from.

columnNames IEnumerable<string>

The column names to select.

normalizeColumnOrder bool

Orders the results arrays by ordinal.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, IEnumerable<string>, bool, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, IEnumerable<string> columnNames, bool normalizeColumnOrder, CancellationToken cancellationToken)

Parameters

reader DbDataReader

The DbDataReader to read results from.

columnNames IEnumerable<string>

The column names to select.

normalizeColumnOrder bool

Orders the results arrays by ordinal.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, IEnumerable<string>, CancellationToken)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, IEnumerable<string> columnNames, CancellationToken cancellationToken)

Parameters

reader DbDataReader

The DbDataReader to read results from.

columnNames IEnumerable<string>

The column names to select.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, string, params IEnumerable<string>)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, string c, params IEnumerable<string> others)

Parameters

reader DbDataReader

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

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbDataReader, CancellationToken, string, params IEnumerable<string>)

Asynchronously enumerates all records within the current result set using an DbDataReader and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbDataReader reader, CancellationToken cancellationToken, string c, params IEnumerable<string> others)

Parameters

reader DbDataReader

The IDataReader to read results from.

cancellationToken CancellationToken

The cancellation token.

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

ValueTask<QueryResultQueue<object[]>>

The query result that contains all the results and the column mappings.

Remarks

DBNull values are left unchanged (retained).

RetrieveAsync(DbCommand, bool, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

command DbCommand

The command to generate a reader from.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

Optional cancellation token.

Returns

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

RetrieveAsync(DbCommand, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, CancellationToken cancellationToken)

Parameters

command DbCommand

The command to generate a reader from.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, IEnumerable<int>, bool, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, IEnumerable<int> ordinals, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

command DbCommand

The command to generate a reader from.

ordinals IEnumerable<int>

The limited set of ordinals to include. If none are specified, the returned objects will be empty.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, IEnumerable<int>, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, IEnumerable<int> ordinals, CancellationToken cancellationToken)

Parameters

command DbCommand

The command to generate a reader from.

ordinals IEnumerable<int>

The limited set of ordinals to include. If none are specified, the returned objects will be empty.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, int, params IEnumerable<int>)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, int n, params IEnumerable<int> others)

Parameters

command DbCommand

The DbCommand to generate a 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

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

RetrieveAsync(DbCommand, CancellationToken, int, params IEnumerable<int>)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, CancellationToken cancellationToken, int n, params IEnumerable<int> others)

Parameters

command DbCommand

The command to generate a reader from.

cancellationToken CancellationToken

The cancellation token.

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

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

RetrieveAsync(DbCommand, IEnumerable<string>, bool, bool, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, IEnumerable<string> columnNames, bool normalizeColumnOrder = false, bool useReadAsync = true, CancellationToken cancellationToken = default)

Parameters

command DbCommand

The DbCommand to generate a reader from.

columnNames IEnumerable<string>

The column names to select.

normalizeColumnOrder bool

Orders the results arrays by ordinal.

useReadAsync bool

If true (default) will iterate the results using .ReadAsync() otherwise will only Execute the reader asynchronously and then use .Read() to iterate the results but still allowing cancellation.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, IEnumerable<string>, bool, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, IEnumerable<string> columnNames, bool normalizeColumnOrder, CancellationToken cancellationToken)

Parameters

command DbCommand

The DbCommand to generate a reader from.

columnNames IEnumerable<string>

The column names to select.

normalizeColumnOrder bool

Orders the results arrays by ordinal.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, IEnumerable<string>, CancellationToken)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, IEnumerable<string> columnNames, CancellationToken cancellationToken)

Parameters

command DbCommand

The DbCommand to generate a reader from.

columnNames IEnumerable<string>

The column names to select.

cancellationToken CancellationToken

The cancellation token.

Returns

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

RetrieveAsync(DbCommand, string, params IEnumerable<string>)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, string columnName, params IEnumerable<string> otherColumnNames)

Parameters

command DbCommand

The DbCommand to generate a reader from.

columnName string

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

otherColumnNames IEnumerable<string>

The remaining column names to request from the reader for each record.

Returns

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

RetrieveAsync(DbCommand, CancellationToken, string, params IEnumerable<string>)

Asynchronously executes a reader and enumerates all the remaining values of the current result set and returns the desired results.

public static ValueTask<QueryResultQueue<object[]>> RetrieveAsync(this DbCommand command, CancellationToken cancellationToken, string columnName, params IEnumerable<string> otherColumnNames)

Parameters

command DbCommand

The DbCommand to generate a reader from.

cancellationToken CancellationToken

The cancellation token.

columnName string

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

otherColumnNames IEnumerable<string>

The remaining column names to request from the reader for each record.

Returns

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