Class ScalarDbItemPlan
Base plan for a value read from one column. Derive from this type to define how a database value is read after the standard null and order checks.
public abstract class ScalarDbItemPlan : SimpleDbItemParser, ISimpleDbItemPlan, IColumnOrdinalPlan
- Inheritance
-
ScalarDbItemPlan
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ScalarDbItemPlan(Type, Type, string, INullColHandler, int)
Base plan for a value read from one column. Derive from this type to define how a database value is read after the standard null and order checks.
protected ScalarDbItemPlan(Type parentType, Type outputType, string parameterName, INullColHandler nullHandler, int ordinal)
Parameters
parentTypeTypeoutputTypeTypeparameterNamestringnullHandlerINullColHandlerordinalint
Properties
ColumnOrdinal
The zero-based result-column ordinal.
public int ColumnOrdinal { get; }
Property Value
NullHandler
The target's null policy.
protected INullColHandler NullHandler { get; }
Property Value
OutputType
The type left on the evaluation stack by EmitValue(ColumnInfo, Generator).
protected Type OutputType { get; }
Property Value
ParameterName
The mapped parameter or member name used by null errors.
protected string ParameterName { get; }
Property Value
ParentType
The type containing the value being assigned.
protected Type ParentType { get; }
Property Value
Methods
Emit(ColumnInfo[], Generator, NullSetPoint)
Writes the instructions that read this value from the current row.
public override sealed void Emit(ColumnInfo[] cols, Generator generator, NullSetPoint nullSetPoint)
Parameters
colsColumnInfo[]The columns the result carries.
generatorGeneratorThe instruction writer to use.
nullSetPointNullSetPointWhere to jump when a value is
NULLand the object must collapse.
EmitValue(ColumnInfo, Generator)
Writes the non null read for column and leaves exactly one
OutputType value on the evaluation stack.
protected abstract void EmitValue(ColumnInfo column, Generator generator)
Parameters
columnColumnInfoThe result column to read.
generatorGeneratorThe instruction writer to use.
IsSequencial(ref int)
Returns whether this plan reads columns in increasing order. Update previousIndex
with the final column used.
public override bool IsSequencial(ref int previousIndex)
Parameters
previousIndexint
Returns
NeedNullSetPoint(ColumnInfo[])
Returns whether this plan can collapse its owning object when it reads a NULL.
public override bool NeedNullSetPoint(ColumnInfo[] cols)
Parameters
colsColumnInfo[]