Interface ISqlDataRecordFacade<TDataRecord>
- Namespace
- LfrlAnvil.Sql.Statements.Compilers
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a facade over an IDataRecord instance.
public interface ISqlDataRecordFacade<out TDataRecord> where TDataRecord : IDataRecord
Type Parameters
TDataRecordDB data record type.
Remarks
Do not use this interface directly. It should only be used in query reader creation options, for custom value reading expressions. See SqlQueryMemberConfiguration for more information.
Properties
Record
Underlying DB data record instance. Usage of this property will be included in a query reader as-is, without any translation.
TDataRecord Record { get; }
Property Value
- TDataRecord
Methods
GetNullable<T>(string)
Represents reading of a generic nullable value by field name from the Record.
[Pure]
T? GetNullable<T>(string name)
Parameters
namestringField name.
Returns
- T
Read value.
Type Parameters
TValue type.
Remarks
Usage of this method will be translated so that the field name will be replaced with an equivalent cached ordinal.
GetNullable<T>(string, T)
Represents reading of a generic nullable value by field name from the Record.
[Pure]
T GetNullable<T>(string name, T @default) where T : notnull
Parameters
namestringField name.
defaultTDefault value to return instead of null.
Returns
- T
Read value or
defaultwhen read value is null.
Type Parameters
TValue type.
Remarks
Usage of this method will be translated so that the field name will be replaced with an equivalent cached ordinal.
GetOrdinal(string)
Returns an ordinal value associated with the provided field name in the Record.
[Pure]
int GetOrdinal(string name)
Parameters
namestringField name.
Returns
- int
Ordinal value associated with the provided field name.
Remarks
Usage of this method will be translated so that the cached ordinal is returned.
Get<T>(string)
Represents reading of a generic non-null value by field name from the Record.
[Pure]
T Get<T>(string name) where T : notnull
Parameters
namestringField name.
Returns
- T
Read value.
Type Parameters
TValue type.
Remarks
Usage of this method will be translated so that the field name will be replaced with an equivalent cached ordinal.
IsNull(string)
Checks whether or not a value associated with the provided field name is null in the Record.
[Pure]
bool IsNull(string name)
Parameters
namestringField name.
Returns
- bool
true when value is null, otherwise false.
Remarks
Usage of this method will be translated so that the field name will be replaced with an equivalent cached ordinal.