|
static Variable | FindVariable (this IContext context, string variableName) |
|
static bool | VariableExists (this IContext context, string variableName) |
|
static bool | DropVariable (this IContext context, string variableName) |
|
static Variable | DeclareVariable (this IContext context, VariableInfo variableInfo) |
|
static Variable | DeclareVariable (this IContext context, string variableName, SqlType variableType) |
|
static Variable | DeclareVariable (this IContext context, string variableName, SqlType variableType, bool constant) |
|
static Variable | SetVariable (this IContext context, string variableName, SqlExpression value) |
|
static IVariableResolver | VariableResolver (this IContext context) |
|
Definition at line 24 of file ContextExtensions.cs.
Definition at line 77 of file ContextExtensions.cs.
78 if (context.VariableExists(variableInfo.VariableName))
79 throw new InvalidOperationException(
String.Format(
"Variable '{0}' already defined in the context hierarchy.", variableInfo.VariableName));
81 var currentContext = context;
82 while (currentContext != null) {
83 if (currentContext is IVariableScope) {
84 var scope = (IVariableScope)currentContext;
85 return scope.DefineVariable(variableInfo);
88 currentContext = currentContext.Parent;
A long string in the system.
static Variable Deveel.Data.Sql.Variables.ContextExtensions.DeclareVariable |
( |
this IContext |
context, |
|
|
string |
variableName, |
|
|
SqlType |
variableType |
|
) |
| |
|
inlinestatic |
Definition at line 95 of file ContextExtensions.cs.
static Variable DeclareVariable(this IContext context, VariableInfo variableInfo)
static Variable Deveel.Data.Sql.Variables.ContextExtensions.DeclareVariable |
( |
this IContext |
context, |
|
|
string |
variableName, |
|
|
SqlType |
variableType, |
|
|
bool |
constant |
|
) |
| |
|
inlinestatic |
Definition at line 99 of file ContextExtensions.cs.
100 return context.DeclareVariable(
new VariableInfo(variableName, variableType, constant));
static bool Deveel.Data.Sql.Variables.ContextExtensions.DropVariable |
( |
this IContext |
context, |
|
|
string |
variableName |
|
) |
| |
|
inlinestatic |
Definition at line 60 of file ContextExtensions.cs.
61 var currentContext = context;
62 while (currentContext != null) {
63 if (currentContext is IVariableScope) {
64 var scope = (IVariableScope)currentContext;
65 if (scope.HasVariable(variableName))
66 return scope.DropVariable(variableName);
69 currentContext = currentContext.Parent;
static Variable Deveel.Data.Sql.Variables.ContextExtensions.FindVariable |
( |
this IContext |
context, |
|
|
string |
variableName |
|
) |
| |
|
inlinestatic |
Definition at line 25 of file ContextExtensions.cs.
26 var currentContext = context;
27 while (currentContext != null) {
28 if (currentContext is IVariableScope) {
29 var scope = (IVariableScope) currentContext;
30 var variable = scope.GetVariable(variableName);
35 currentContext = currentContext.Parent;
Definition at line 103 of file ContextExtensions.cs.
104 var currentContext = context;
105 while (currentContext != null) {
106 if (currentContext is IVariableScope) {
107 var scope = (IVariableScope) currentContext;
108 if (scope.HasVariable(variableName)) {
110 var constantValue = value.EvaluateToConstant(null, context.VariableResolver());
111 return scope.SetVariable(variableName, constantValue);
115 currentContext = currentContext.Parent;
118 currentContext = context;
119 while (currentContext != null) {
120 if (currentContext is IVariableScope) {
121 var scope = (IVariableScope)currentContext;
123 var constantValue = value.EvaluateToConstant(null, context.VariableResolver());
124 return scope.SetVariable(variableName, constantValue);
127 currentContext = currentContext.Parent;
static bool Deveel.Data.Sql.Variables.ContextExtensions.VariableExists |
( |
this IContext |
context, |
|
|
string |
variableName |
|
) |
| |
|
inlinestatic |
Definition at line 43 of file ContextExtensions.cs.
44 var currentContext = context;
45 while (currentContext != null) {
46 if (currentContext is IVariableScope) {
47 var scope = (IVariableScope)currentContext;
48 if (scope.HasVariable(variableName))
52 currentContext = currentContext.Parent;
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Sql.Variables/ContextExtensions.cs