9 namespace Deveel.Data.Sql.Compile {
14 const string sql =
"DECLARE a NUMERIC(2, 3)";
16 var result = Compile(sql);
17 Assert.IsNotNull(result);
18 Assert.IsFalse(result.HasErrors);
20 Assert.AreEqual(1, result.Statements.Count);
24 Assert.AreEqual(
"a", statement.VariableName);
25 Assert.AreEqual(
false, statement.IsNotNull);
26 Assert.AreEqual(
false, statement.IsConstant);
27 Assert.IsInstanceOf<
NumericType>(statement.VariableType);
32 const string sql =
"DECLARE a CONSTANT NUMERIC(2, 3)";
34 var result = Compile(sql);
35 Assert.IsNotNull(result);
36 Assert.IsFalse(result.HasErrors);
38 Assert.AreEqual(1, result.Statements.Count);
42 Assert.AreEqual(
"a", statement.VariableName);
43 Assert.AreEqual(
true, statement.IsNotNull);
44 Assert.AreEqual(
true, statement.IsConstant);
45 Assert.IsInstanceOf<
NumericType>(statement.VariableType);
50 const string sql =
"a NUMERIC(2, 3)";
52 var result = Compile(sql);
53 Assert.IsNotNull(result);
54 Assert.IsFalse(result.HasErrors);
56 Assert.AreEqual(1, result.Statements.Count);
60 Assert.AreEqual(
"a", statement.VariableName);
61 Assert.IsInstanceOf<
NumericType>(statement.VariableType);
void ImplicitDeclaration()
void DeclareConstantVariable()
void DeclareSimpleVariable()