Table of Contents

Interface IQueryCommand

Namespace
Rinku.Querying
Assembly
Rinku.dll

What it takes to turn a query and a set of values into a ready-to-run database command. The execution methods build on this, most code runs a QueryCommand through those rather than calling here.

public interface IQueryCommand
Extension Methods

Properties

Mapper

Maps the query's key names to their slot in the values array.

Mapper Mapper { get; }

Property Value

Mapper

StartBaseHandlers

The first slot for a literal-injection handler. Slots below it carry parameter values.

int StartBaseHandlers { get; }

Property Value

int

StartBoolCond

The first slot for a toggle-only condition, the ones that carry no value.

int StartBoolCond { get; }

Property Value

int

StartSpecialHandlers

The first slot for a special handler, the ones that expand into several parameters.

int StartSpecialHandlers { get; }

Property Value

int

Methods

SetCommand(DbCommand, object, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand(DbCommand cmd, object parameterObj, Span<bool> usageMap)

Parameters

cmd DbCommand

The command to fill.

parameterObj object

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

SetCommand(DbCommand, object?[])

Sets cmd's text and parameters for one run from a pre-built values array, the same array a QueryBuilder holds.

bool SetCommand(DbCommand cmd, object?[] variables)

Parameters

cmd DbCommand

The command to fill.

variables object[]

The values for this run, one slot per key.

Returns

bool

true when the command is ready to run.

SetCommand(IDbCommand, object, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand(IDbCommand cmd, object parameterObj, Span<bool> usageMap)

Parameters

cmd IDbCommand

The command to fill.

parameterObj object

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

SetCommand(IDbCommand, object?[])

Sets cmd's text and parameters for one run from a pre-built values array, the same array a QueryBuilder holds.

bool SetCommand(IDbCommand cmd, object?[] variables)

Parameters

cmd IDbCommand

The command to fill.

variables object[]

The values for this run, one slot per key.

Returns

bool

true when the command is ready to run.

SetCommand<T>(DbCommand, T, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand<T>(DbCommand cmd, T parameterObj, Span<bool> usageMap) where T : notnull

Parameters

cmd DbCommand

The command to fill.

parameterObj T

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

Type Parameters

T

SetCommand<T>(DbCommand, ref T, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand<T>(DbCommand cmd, ref T parameterObj, Span<bool> usageMap) where T : notnull

Parameters

cmd DbCommand

The command to fill.

parameterObj T

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

Type Parameters

T

SetCommand<T>(IDbCommand, T, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand<T>(IDbCommand cmd, T parameterObj, Span<bool> usageMap) where T : notnull

Parameters

cmd IDbCommand

The command to fill.

parameterObj T

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

Type Parameters

T

SetCommand<T>(IDbCommand, ref T, Span<bool>)

Sets cmd's text and parameters for one run, reading the values from a parameter object matched to keys by name, and records which keys were used in usageMap.

bool SetCommand<T>(IDbCommand cmd, ref T parameterObj, Span<bool> usageMap) where T : notnull

Parameters

cmd IDbCommand

The command to fill.

parameterObj T

The object whose members supply the values.

usageMap Span<bool>

Filled with which keys ended up used, so the result can be read back correctly.

Returns

bool

true when the command is ready to run.

Type Parameters

T