DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Static Public Member Functions | List of all members
Deveel.Data.Sql.Variables.VariableScopeExtensions Class Reference

Static Public Member Functions

static bool HasVariable (this IVariableScope scope, string variableName)
 
static Variable DefineVariable (this IVariableScope scope, VariableInfo variableInfo)
 
static Variable DefineVariable (this IVariableScope scope, string variableName, SqlType variableType)
 
static Variable DefineVariable (this IVariableScope scope, string variableName, SqlType variableType, bool constant)
 
static bool DropVariable (this IVariableScope scope, string variableName)
 
static Variable GetVariable (this IVariableScope scope, string variableName)
 
static Variable SetVariable (this IVariableScope scope, string variableName, DataObject value)
 
static void SetBooleanVariable (this IVariableScope transaction, string name, bool value)
 
static void SetStringVariable (this IVariableScope transaction, string name, string value)
 
static bool GetBooleanVariable (this IVariableScope transaction, string name)
 
static string GetStringVariable (this IVariableScope transaction, string name)
 

Detailed Description

Definition at line 23 of file VariableScopeExtensions.cs.

Member Function Documentation

static Variable Deveel.Data.Sql.Variables.VariableScopeExtensions.DefineVariable ( this IVariableScope  scope,
VariableInfo  variableInfo 
)
inlinestatic

Definition at line 28 of file VariableScopeExtensions.cs.

28  {
29  return scope.VariableManager.DefineVariable(variableInfo);
30  }
static Variable Deveel.Data.Sql.Variables.VariableScopeExtensions.DefineVariable ( this IVariableScope  scope,
string  variableName,
SqlType  variableType 
)
inlinestatic

Definition at line 32 of file VariableScopeExtensions.cs.

32  {
33  return DefineVariable(scope, variableName, variableType, false);
34  }
static Variable DefineVariable(this IVariableScope scope, VariableInfo variableInfo)
static Variable Deveel.Data.Sql.Variables.VariableScopeExtensions.DefineVariable ( this IVariableScope  scope,
string  variableName,
SqlType  variableType,
bool  constant 
)
inlinestatic

Definition at line 36 of file VariableScopeExtensions.cs.

36  {
37  return scope.DefineVariable(new VariableInfo(variableName, variableType, constant));
38  }
static bool Deveel.Data.Sql.Variables.VariableScopeExtensions.DropVariable ( this IVariableScope  scope,
string  variableName 
)
inlinestatic

Definition at line 40 of file VariableScopeExtensions.cs.

40  {
41  return scope.VariableManager.DropVariable(variableName);
42  }
static bool Deveel.Data.Sql.Variables.VariableScopeExtensions.GetBooleanVariable ( this IVariableScope  transaction,
string  name 
)
inlinestatic

Definition at line 65 of file VariableScopeExtensions.cs.

65  {
66  var variable = transaction.GetVariable(name);
67  if (variable == null)
68  return false;
69 
70  return variable.Value.AsBoolean();
71  }
static string Deveel.Data.Sql.Variables.VariableScopeExtensions.GetStringVariable ( this IVariableScope  transaction,
string  name 
)
inlinestatic

Definition at line 73 of file VariableScopeExtensions.cs.

73  {
74  var variable = transaction.GetVariable(name);
75  if (variable == null)
76  return null;
77 
78  return variable.Value;
79  }
static Variable Deveel.Data.Sql.Variables.VariableScopeExtensions.GetVariable ( this IVariableScope  scope,
string  variableName 
)
inlinestatic

Definition at line 44 of file VariableScopeExtensions.cs.

44  {
45  return scope.VariableManager.GetVariable(variableName);
46  }
static bool Deveel.Data.Sql.Variables.VariableScopeExtensions.HasVariable ( this IVariableScope  scope,
string  variableName 
)
inlinestatic

Definition at line 24 of file VariableScopeExtensions.cs.

24  {
25  return scope.VariableManager.VariableExists(variableName);
26  }
static void Deveel.Data.Sql.Variables.VariableScopeExtensions.SetBooleanVariable ( this IVariableScope  transaction,
string  name,
bool  value 
)
inlinestatic

Definition at line 57 of file VariableScopeExtensions.cs.

57  {
58  transaction.SetVariable(name, DataObject.Boolean(value));
59  }
static void Deveel.Data.Sql.Variables.VariableScopeExtensions.SetStringVariable ( this IVariableScope  transaction,
string  name,
string  value 
)
inlinestatic

Definition at line 61 of file VariableScopeExtensions.cs.

61  {
62  transaction.SetVariable(name, DataObject.String(value));
63  }
static Variable Deveel.Data.Sql.Variables.VariableScopeExtensions.SetVariable ( this IVariableScope  scope,
string  variableName,
DataObject  value 
)
inlinestatic

Definition at line 48 of file VariableScopeExtensions.cs.

48  {
49  var variable = scope.GetVariable(variableName);
50  if (variable == null)
51  variable = scope.DefineVariable(variableName, value.Type);
52 
53  variable.SetValue(value);
54  return variable;
55  }

The documentation for this class was generated from the following file: