Table of Contents

Class DbParamInfo

Namespace
Rinku.Querying
Assembly
Rinku.dll

How one parameter is bound onto a command, add, set, update, remove. Subclass it to take over binding for a parameter, for a provider quirk or a custom type the default path handles wrong.

public abstract class DbParamInfo
Inheritance
DbParamInfo
Derived
Inherited Members
Extension Methods

Constructors

DbParamInfo(bool, bool)

How one parameter is bound onto a command, add, set, update, remove. Subclass it to take over binding for a parameter, for a provider quirk or a custom type the default path handles wrong.

protected DbParamInfo(bool IsCached, bool HasDefaultSet = false)

Parameters

IsCached bool
HasDefaultSet bool

Fields

HasDefaultSet

Whether this strategy can materialize a parameter when no value was supplied.

public readonly bool HasDefaultSet

Field Value

bool

IsCached

Whether this strategy is settled. While false, the command may still replace it with a more exact one learned from the provider.

public bool IsCached

Field Value

bool

Methods

Remove(IDbCommand, object)

Drops the parameter reference from the command.

public abstract void Remove(IDbCommand cmd, object currentValue)

Parameters

cmd IDbCommand
currentValue object

RemoveSingle(string, DbCommand)

Removes a parameter by name from the command collection.

public static bool RemoveSingle(string paramName, DbCommand cmd)

Parameters

paramName string
cmd DbCommand

Returns

bool

RemoveSingle(string, IDbCommand)

Drops a parameter from the command by name.

public static bool RemoveSingle(string paramName, IDbCommand cmd)

Parameters

paramName string
cmd IDbCommand

Returns

bool

SaveUse(string, IDbCommand, ref object)

Binds a value and hands back the parameter reference in value, so a later Update(IDbCommand, ref object?, object?) can change it without a lookup.

public abstract bool SaveUse(string paramName, IDbCommand cmd, ref object value)

Parameters

paramName string
cmd IDbCommand
value object

Returns

bool

SetDefault(string, IDbCommand)

Materializes the parameter's default state and returns the live state it created.

public virtual object? SetDefault(string paramName, IDbCommand cmd)

Parameters

paramName string
cmd IDbCommand

Returns

object

Update(IDbCommand, ref object?, object?)

Changes an already-bound parameter's value. currentValue is the parameter reference a previous SaveUse(string, IDbCommand, ref object) handed back.

public abstract bool Update(IDbCommand cmd, ref object? currentValue, object? newValue)

Parameters

cmd IDbCommand
currentValue object
newValue object

Returns

bool

Use(string, DbCommand, object)

Binds a value to the command for a single execution.

public abstract bool Use(string paramName, DbCommand cmd, object value)

Parameters

paramName string
cmd DbCommand
value object

Returns

bool

Use(string, IDbCommand, object)

Binds a value for a single run, without keeping a reference for reuse.

public abstract bool Use(string paramName, IDbCommand cmd, object value)

Parameters

paramName string
cmd IDbCommand
value object

Returns

bool