24 using NUnit.Framework;
26 namespace Deveel.Data.Sql {
29 protected override void OnSetUp(
string testName) {
37 var row = table.NewRow();
58 var tableInfo = CreateFirstTable();
59 Query.CreateTable(tableInfo);
60 Query.AddPrimaryKey(tableInfo.TableName,
"person_id");
62 tableInfo = CreateSecondTable();
63 Query.CreateTable(tableInfo);
87 Assert.DoesNotThrow(() => expression =
SqlExpression.
Parse(
"SELECT * FROM persons, codes"));
88 Assert.IsNotNull(expression);
92 Assert.DoesNotThrow(() => resultExpression = expression.
Evaluate(
Query, null));
93 Assert.IsNotNull(resultExpression);
97 Assert.IsInstanceOf<
QueryType>(constantExpression.Value.Type);
102 Assert.DoesNotThrow(() => result = queryPlan.QueryPlan.Evaluate(
Query));
104 Assert.IsNotNull(result);
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static DataObject Date(DateTimeOffset value)
static DataObject Integer(int value)
Defines the contract to access the data contained into a table of a database.
static SqlExpression Parse(string s)
Parses the given SQL string to an expression that can be evaluated.
TableInfo CreateFirstTable()
static NumericType Integer()
Describes the name of an object within a database.
static DataObject String(string s)
TableInfo CreateSecondTable()
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 ...
static DateType DateTime()
An expression that holds a constant value.
static StringType String()
Defines the base class for instances that represent SQL expression tree nodes.
Defines the metadata properties of a table existing within a database.
override void OnSetUp(string testName)