VariableScope
- Namespace:
PPDS.Dataverse.Query.Execution - Assembly:
PPDS.Dataverse - Kind: Class
Summary
Manages SQL variable declarations and values. Variables are declared with DECLARE @name TYPE [= value] and used with SET @name = expression or in WHERE clauses.
Members
Methods
Declare
void Declare(string name, string typeName, object initialValue)
Declares a variable with a type and optional initial value.
-
Param
name: Variable name (must start with @). -
Param
typeName: The SQL type name. -
Param
initialValue: Optional initial value.
Get
object Get(string name)
Gets the current value of a declared variable.
-
Param
name: Variable name. -
Returns: The variable's current value.
IsDeclared
bool IsDeclared(string name)
Checks whether a variable has been declared.
Set
void Set(string name, object value)
Sets the value of a previously declared variable.
-
Param
name: Variable name (must have been declared). -
Param
value: The new value.
Properties
Variables
IReadOnlyDictionary<string, VariableInfo> Variables { get; }
Gets all declared variables (read-only view).