23 using NUnit.Framework;
25 namespace Deveel.Data.Routines {
40 Assert.IsNotNull(
function);
42 Assert.AreEqual(
"user",
function.FullName.Name);
49 Assert.IsNotNull(
function);
51 Assert.AreEqual(
"user",
function.FullName.Name);
57 Assert.DoesNotThrow(() => result = InvokeFunction(
"user"));
58 Assert.IsNotNull(result);
59 Assert.AreEqual(AdminUserName, result.
Value.ToString());
66 Assert.DoesNotThrow(() => result = InvokeFunction(
"TOSTRING", value));
67 Assert.IsNotNull(result);
70 var stringResult = result.
Value.ToString();
71 Assert.AreEqual(
"455366", stringResult);
78 Assert.DoesNotThrow(() => result = InvokeFunction(
"TOSTRING", value));
79 Assert.IsNotNull(result);
82 var stringResult = result.
Value.ToString();
83 Assert.AreEqual(
"2015-02-10", stringResult);
90 Assert.DoesNotThrow(() => result = InvokeFunction(
"TOSTRING", value));
91 Assert.IsNotNull(result);
94 var stringResult = result.
Value.ToString();
95 Assert.AreEqual(
"2015-02-10T17:15:01.000 +00:00", stringResult);
static DataObject Date(DateTimeOffset value)
static DataObject Integer(int value)
SqlType Type
Gets the SqlType that defines the object properties
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
Defines a routine that is a function, that means it returns a value after its execution.
void InvokeIntegerToString()
void ResolveSystemFunctionFullyQualified()
Describes the name of an object within a database.
ISqlObject Value
Gets the underlined value that is handled.
DataObject InvokeFunction(string name, DataObject arg)
static DataObject InvokeSystemFunction(this IQuery query, string functionName, params SqlExpression[] args)
void InvokeUserFunction()
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
static DataObject TimeStamp(SqlDateTime value)
void InvokeDateToString()
Provides utilities and properties for handling the SYSTEN schema of a database.
static IFunction ResolveFunction(this IQuery query, Invoke invoke)
DataObject InvokeFunction(string name)
void InvokeTimeStampToString_NoFormat()
Defines the base class for instances that represent SQL expression tree nodes.
const string Name
The name of the system schema that contains tables referring to system information.
static SqlConstantExpression Constant(object value)
void ResolveSystemFunctionWithNoSchema()