27 namespace Deveel.Data.Routines {
36 return ob1 != null ? (ob2.
IsNull ? ob1 : (!ob1.
IsNull ? ob1.
Or(ob2) : ob2)) : ob2;
69 return value.
CastTo(destType);
74 return Cast(value, destType);
91 var value = UniqueKey(query, tableNameString);
96 var tableNameString = tableName.
ToString();
97 var resolvedName = query.
Query.ResolveTableName(tableNameString);
98 return query.
Query.GetNextValue(resolvedName);
103 var value = CurrentValue(query, tableNameString);
108 var tableNameString = tableName.
ToString();
109 var resolvedName = query.
Query.ResolveTableName(tableNameString);
110 return query.
Query.GetCurrentValue(resolvedName);
118 var condition = context.
Arguments[0].EvaluateToConstant(evalContext);
121 result = context.
Arguments[1].EvaluateToConstant(evalContext);
123 result = context.
Arguments[2].EvaluateToConstant(evalContext);
127 return context.
Result(result);
134 str = obj.
Value.ToString();
137 if (str == null || str.Equals(
"") || str.Equals(
"NO ACTION")) {
139 }
else if (str.Equals(
"CASCADE")) {
141 }
else if (str.Equals(
"SET NULL")) {
143 }
else if (str.Equals(
"SET DEFAULT")) {
145 }
else if (str.Equals(
"RESTRICT")) {
148 throw new InvalidOperationException(
"Unrecognised foreign key rule: " + str);
166 throw new InvalidOperationException(
"Unrecognised foreign key rule: " + code);
172 throw new InvalidOperationException(
"Unsupported type in function argument");
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static readonly DataObject BooleanFalse
The representation of a BOOLEAN false as DataObject
bool IsNull
Gets a value that indicates if this object is materialized as null.
static DataObject Integer(int value)
static DataObject ToDate(SqlString value)
SqlType Type
Gets the SqlType that defines the object properties
A long string in the system.
static SqlNumber CurrentValue(IRequest query, SqlString tableName)
static DataObject ToDate(DataObject obj)
DataObject CastTo(SqlType destType)
Converts this object to the given SqlType.
static DataObject Cast(IQuery query, DataObject value, SqlString typeString)
static InvokeResult Iif(InvokeContext context)
static DataObject Number(SqlNumber value)
static DataObject Null(SqlType type)
static DataObject CurrentValue(IRequest query, DataObject tableName)
SqlExpression[] Arguments
Gets the array of expressions forming the arguments of the execution.
static BinaryType Binary(int maxSize)
static DataObject UniqueKey(IRequest query, DataObject tableName)
static DataObject Or(DataObject ob1, DataObject ob2)
static SqlNumber UniqueKey(IRequest query, SqlString tableName)
static readonly DataObject BooleanTrue
The representation of a BOOLEAN true as DataObject
ISqlObject Value
Gets the underlined value that is handled.
static DataObject String(string s)
static DataObject ToBinary(DataObject value)
IVariableResolver VariableResolver
static DataObject ToString(DataObject value)
ForeignKeyAction
Enumerates the foreign key referential trigger actions.
static DateType TimeStamp()
IGroupResolver GroupResolver
static DataObject ToNumber(DataObject value)
static DataObject Cast(DataObject value, SqlType destType)
static NumericType Numeric()
static DataObject ToTimeStamp(SqlString value)
Represents the result of the execution of a routine.
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
static DateType DateTime()
static DataObject ToTimeStamp(DataObject obj)
static DataObject User(IRequest query)
static DataObject ToDateTime(SqlString value)
string ToString(Encoding encoding)
Defines the properties of a specific SQL Type and handles the values compatible.
InvokeResult Result(DataObject value)
static StringType String()
Encapsulates the elements needed to evaluate an SqlExpression
static DataObject FRuleConvert(DataObject obj)
static DataObject ToDateTime(DataObject obj)
Deveel.Data.Sql.Objects.SqlString SqlString
new IQueryContext Context
DataObject Or(DataObject other)
static SqlType Parse(string s)
Parses a SQL formatted string that defines a data-type into a constructed SqlType object equivalent...