23 namespace Deveel.Data.Sql.Variables {
26 if (variableInfo == null)
27 throw new ArgumentNullException(
"variableInfo");
44 public bool ValueFromExpression {
45 get {
return Expression != null; }
50 public bool IsConstant {
54 public bool IsNotNull {
70 if (!Name.Equals(other.
Name) ||
74 if (ValueFromExpression &&
80 return Value.Equals(other.
Value);
84 if (expression == null)
85 throw new ArgumentNullException(
"expression");
88 throw new InvalidOperationException();
90 if (!expression.IsConstant())
91 throw new ArgumentException();
93 Expression = expression;
95 var exp = expression.
Evaluate(context, null);
97 throw new InvalidOperationException();
105 throw new InvalidOperationException();
107 if (!IsNotNull && value.
IsNull)
108 throw new ArgumentException();
112 throw new ArgumentException();
bool IsNull
Gets a value that indicates if this object is materialized as null.
SqlType Type
Gets the SqlType that defines the object properties
DataObject CastTo(SqlType destType)
Converts this object to the given SqlType.
Represents a database object, such as a table, a trigger, a type or a column.
bool Equals(Variable other)
ObjectName FullName
Gets the fully qualified name of the object used to resolve it uniquely within the database...
Describes the name of an object within a database.
Variable(VariableInfo variableInfo)
SqlExpressionType
All the possible type of SqlExpression supported
A user-defined TYPE that holds complex objects in a database column.
virtual SqlExpression Evaluate(EvaluateContext context)
When overridden by a derived class, this method evaluates the expression within the provided context...
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
DbObjectType ObjectType
Gets the type of database object that the implementation is for
Defines the properties of a specific SQL Type and handles the values compatible.
An expression that holds a constant value.
void SetValue(IQuery context, SqlExpression expression)
virtual bool CanCastTo(SqlType destType)
Verifies if this type can cast any value to the given SqlType.
Defines the base class for instances that represent SQL expression tree nodes.
DbObjectType
The kind of objects that can be handled by a database system and its managers
void SetValue(DataObject value)