Table of Contents

Class DirectionalScaledDbParamCache

Namespace
Rinku.Querying.Defaults
Assembly
Rinku.dll

Represents metadata for directional fixed-precision numeric database parameters (Decimal, Currency).

public sealed class DirectionalScaledDbParamCache : DbParamInfo
Inheritance
DirectionalScaledDbParamCache
Inherited Members
Extension Methods

Constructors

DirectionalScaledDbParamCache(ParameterDirection, DbType, byte, byte, bool?)

Represents metadata for directional fixed-precision numeric database parameters (Decimal, Currency).

public DirectionalScaledDbParamCache(ParameterDirection direction, DbType type, byte precision, byte scale, bool? hasDefault = null)

Parameters

direction ParameterDirection
type DbType
precision byte
scale byte
hasDefault bool?

Fields

Direction

public readonly ParameterDirection Direction

Field Value

ParameterDirection

Precision

public readonly byte Precision

Field Value

byte

Scale

public readonly byte Scale

Field Value

byte

Type

public readonly DbType Type

Field Value

DbType

Methods

Get(ParameterDirection, DbType, byte, byte, bool)

Gets the shared cached metadata for a scaled directional parameter shape.

public static DirectionalScaledDbParamCache Get(ParameterDirection direction, DbType type, byte precision, byte scale, bool hasDefault)

Parameters

direction ParameterDirection
type DbType
precision byte
scale byte
hasDefault bool

Returns

DirectionalScaledDbParamCache

Remove(IDbCommand, object?)

Drops the parameter reference from the command.

public override void Remove(IDbCommand cmd, object? currentValue)

Parameters

cmd IDbCommand
currentValue object

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 override 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 override 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 override 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 override 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 override bool Use(string paramName, IDbCommand cmd, object value)

Parameters

paramName string
cmd IDbCommand
value object

Returns

bool