DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | List of all members
Deveel.Data.Sql.Compile.DeclareVariableTests Class Reference
Inheritance diagram for Deveel.Data.Sql.Compile.DeclareVariableTests:
Deveel.Data.Sql.Compile.SqlCompileTestBase

Public Member Functions

void DeclareSimpleVariable ()
 
void DeclareConstantVariable ()
 
void ImplicitDeclaration ()
 

Additional Inherited Members

- Protected Member Functions inherited from Deveel.Data.Sql.Compile.SqlCompileTestBase
SqlCompileResult Compile (string sql)
 

Detailed Description

Definition at line 11 of file DeclareVariableTests.cs.

Member Function Documentation

void Deveel.Data.Sql.Compile.DeclareVariableTests.DeclareConstantVariable ( )
inline

Definition at line 31 of file DeclareVariableTests.cs.

31  {
32  const string sql = "DECLARE a CONSTANT NUMERIC(2, 3)";
33 
34  var result = Compile(sql);
35  Assert.IsNotNull(result);
36  Assert.IsFalse(result.HasErrors);
37 
38  Assert.AreEqual(1, result.Statements.Count);
39  Assert.IsInstanceOf<DeclareVariableStatement>(result.Statements.First());
40 
41  var statement = (DeclareVariableStatement)result.Statements.First();
42  Assert.AreEqual("a", statement.VariableName);
43  Assert.AreEqual(true, statement.IsNotNull);
44  Assert.AreEqual(true, statement.IsConstant);
45  Assert.IsInstanceOf<NumericType>(statement.VariableType);
46  }
void Deveel.Data.Sql.Compile.DeclareVariableTests.DeclareSimpleVariable ( )
inline

Definition at line 13 of file DeclareVariableTests.cs.

13  {
14  const string sql = "DECLARE a NUMERIC(2, 3)";
15 
16  var result = Compile(sql);
17  Assert.IsNotNull(result);
18  Assert.IsFalse(result.HasErrors);
19 
20  Assert.AreEqual(1, result.Statements.Count);
21  Assert.IsInstanceOf<DeclareVariableStatement>(result.Statements.First());
22 
23  var statement = (DeclareVariableStatement) result.Statements.First();
24  Assert.AreEqual("a", statement.VariableName);
25  Assert.AreEqual(false, statement.IsNotNull);
26  Assert.AreEqual(false, statement.IsConstant);
27  Assert.IsInstanceOf<NumericType>(statement.VariableType);
28  }
void Deveel.Data.Sql.Compile.DeclareVariableTests.ImplicitDeclaration ( )
inline

Definition at line 49 of file DeclareVariableTests.cs.

49  {
50  const string sql = "a NUMERIC(2, 3)";
51 
52  var result = Compile(sql);
53  Assert.IsNotNull(result);
54  Assert.IsFalse(result.HasErrors);
55 
56  Assert.AreEqual(1, result.Statements.Count);
57  Assert.IsInstanceOf<DeclareVariableStatement>(result.Statements.First());
58 
59  var statement = (DeclareVariableStatement)result.Statements.First();
60  Assert.AreEqual("a", statement.VariableName);
61  Assert.IsInstanceOf<NumericType>(statement.VariableType);
62  }

The documentation for this class was generated from the following file: