Class DirectionalDbParamCache
Represents metadata for directional fixed-type database parameters (e.g., Integers, Booleans)
public sealed class DirectionalDbParamCache : DbParamInfo
- Inheritance
-
DirectionalDbParamCache
- Inherited Members
- Extension Methods
Constructors
DirectionalDbParamCache(ParameterDirection, DbType, bool?)
Represents metadata for directional fixed-type database parameters (e.g., Integers, Booleans)
public DirectionalDbParamCache(ParameterDirection direction, DbType type, bool? hasDefault = null)
Parameters
directionParameterDirectiontypeDbTypehasDefaultbool?
Fields
Direction
public readonly ParameterDirection Direction
Field Value
Type
public readonly DbType Type
Field Value
Methods
Get(ParameterDirection, DbType, bool)
Gets the shared cached metadata for an unsized directional parameter shape.
public static DirectionalDbParamCache Get(ParameterDirection direction, DbType type, bool hasDefault)
Parameters
directionParameterDirectiontypeDbTypehasDefaultbool
Returns
Remove(IDbCommand, object?)
Drops the parameter reference from the command.
public override void Remove(IDbCommand cmd, object? currentValue)
Parameters
cmdIDbCommandcurrentValueobject
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
paramNamestringcmdIDbCommandvalueobject
Returns
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
paramNamestringcmdIDbCommand
Returns
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
cmdIDbCommandcurrentValueobjectnewValueobject
Returns
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
Returns
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
paramNamestringcmdIDbCommandvalueobject