Table of Contents

Interface ITypeParser<T>

Namespace
Rinku.Mapping.Parsers
Assembly
Rinku.dll

Reads query rows as T. Implement one to add a result shape that can be requested through Query<T>.

public interface ITypeParser<T> : ITypeParser, IDisposable

Type Parameters

T
Inherited Members
Extension Methods

Methods

Default()

The value to return when the result has no row, an empty collection or optional, for instance.

T Default()

Returns

T

Parse(DbDataReader)

Parses one T starting at the current row, advancing the reader as it goes. CanContinue reports the state of the reader on return, true when it is positioned on an untreated row, false when no row is left

(bool CanContinue, T Result) Parse(DbDataReader reader)

Parameters

reader DbDataReader

Returns

(bool CanContinue, T Result)

ParseAsync(DbDataReader, CancellationToken)

Parses one T starting at the current row, advancing the reader as it goes. CanContinue reports the state of the reader on return, true when it is positioned on an untreated row, false when no row is left

ValueTask<(bool CanContinue, T Result)> ParseAsync(DbDataReader reader, CancellationToken ct = default)

Parameters

reader DbDataReader
ct CancellationToken

Returns

ValueTask<(bool CanContinue, T Result)>

Query(DbCommand, ICache, bool)

Runs command and reads its result as T, also letting cache learn from the executed command.

T Query(DbCommand command, ICache cache, bool disposeCommand = false)

Parameters

command DbCommand
cache ICache
disposeCommand bool

Returns

T

Query(DbCommand, bool)

Runs command and reads its result as T, disposing the command afterward when disposeCommand is set.

T Query(DbCommand command, bool disposeCommand = false)

Parameters

command DbCommand
disposeCommand bool

Returns

T

Query(IDbCommand, ICache, bool)

Runs command and reads its result as T, also letting cache learn from the executed command.

T Query(IDbCommand command, ICache cache, bool disposeCommand = false)

Parameters

command IDbCommand
cache ICache
disposeCommand bool

Returns

T

Query(IDbCommand, bool)

Runs command and reads its result as T, disposing the command afterward when disposeCommand is set.

T Query(IDbCommand command, bool disposeCommand = false)

Parameters

command IDbCommand
disposeCommand bool

Returns

T

QueryAsync(DbCommand, ICache, bool, CancellationToken)

Runs command and reads its result as T, also letting cache learn from the executed command.

Task<T> QueryAsync(DbCommand command, ICache cache, bool disposeCommand = false, CancellationToken ct = default)

Parameters

command DbCommand
cache ICache
disposeCommand bool
ct CancellationToken

Returns

Task<T>

QueryAsync(DbCommand, bool, CancellationToken)

Runs command and reads its result as T, disposing the command afterward when disposeCommand is set.

Task<T> QueryAsync(DbCommand command, bool disposeCommand = false, CancellationToken ct = default)

Parameters

command DbCommand
disposeCommand bool
ct CancellationToken

Returns

Task<T>

QueryAsync(IDbCommand, ICache, bool, CancellationToken)

Runs command and reads its result as T, also letting cache learn from the executed command.

Task<T> QueryAsync(IDbCommand command, ICache cache, bool disposeCommand = false, CancellationToken ct = default)

Parameters

command IDbCommand
cache ICache
disposeCommand bool
ct CancellationToken

Returns

Task<T>

QueryAsync(IDbCommand, bool, CancellationToken)

Runs command and reads its result as T, disposing the command afterward when disposeCommand is set.

Task<T> QueryAsync(IDbCommand command, bool disposeCommand = false, CancellationToken ct = default)

Parameters

command IDbCommand
disposeCommand bool
ct CancellationToken

Returns

Task<T>