Skip to main content

SalSqlBindVariables

Namespace: PPJ.Runtime.Sql

Assembly: PPJ.Runtime.50 (5.0.0.0)

Parses and evaluates SQL bind expressions and INTO assignment targets.

public class SalSqlBindVariables

Set Context to the object that exposes expression values. Evaluation scopes cache root references until LeaveScope is called.

Example:

using PPJ.Runtime.Sql;

var bindings = new SalSqlBindVariables();
bindings.Context = new { CustomerId = 42 };
bindings.ParseBinds(":CustomerId");
object[] values = bindings.ReadBindValues();

Constructors

Instance member SalSqlBindVariables()

Initializes empty bind and INTO collections and the configured script parser.

Properties

Instance member Context

Object: Gets or sets the object used to resolve bind expressions.

Static member DefaultParserType

Type: Gets or sets the parser type instantiated by new bind collections; null selects the C# parser.

Instance member ParsedIntos

BindVar[]: Gets the parsed INTO targets used to receive result columns.

Instance member ParsedVars

BindVar[]: Gets the parsed input and input/output bind expressions.

Methods

Instance member Clear()

Removes parsed expressions and resets the script environment.

Instance member LeaveScope()

Ends the current expression evaluation scope and releases its cached references.

Instance member NewScope()

Begins an expression evaluation scope that caches root object references.

Instance member ParseBinds(vars)

Parses a list of SAL bind expressions and replaces the parsed bindings.

ParameterTypeDescription
varsStringThe comma-separated colon-prefixed expressions to parse, such as ":customerId, :customerName".

Returns: Int32. The total number of parsed bind expressions and INTO targets.

Instance member ReadBindValues()

Evaluates all parsed bind expressions within a temporary scope.

Returns: Object[]. The bind values in parameter order, or an empty array when no binds are present.