Table of Contents

Class ScalarDbItemPlan

Namespace
Rinku.Mapping
Assembly
Rinku.dll

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

parentType Type
outputType Type
parameterName string
nullHandler INullColHandler
ordinal int

Properties

ColumnOrdinal

The zero-based result-column ordinal.

public int ColumnOrdinal { get; }

Property Value

int

NullHandler

The target's null policy.

protected INullColHandler NullHandler { get; }

Property Value

INullColHandler

OutputType

The type left on the evaluation stack by EmitValue(ColumnInfo, Generator).

protected Type OutputType { get; }

Property Value

Type

ParameterName

The mapped parameter or member name used by null errors.

protected string ParameterName { get; }

Property Value

string

ParentType

The type containing the value being assigned.

protected Type ParentType { get; }

Property Value

Type

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

cols ColumnInfo[]

The columns the result carries.

generator Generator

The instruction writer to use.

nullSetPoint NullSetPoint

Where to jump when a value is NULL and 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

column ColumnInfo

The result column to read.

generator Generator

The 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

previousIndex int

Returns

bool

NeedNullSetPoint(ColumnInfo[])

Returns whether this plan can collapse its owning object when it reads a NULL.

public override bool NeedNullSetPoint(ColumnInfo[] cols)

Parameters

cols ColumnInfo[]

Returns

bool