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

Public Member Functions

void WithColumns ()
 
void WithoutColumns ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 10 of file CreateViewTests.cs.

Member Function Documentation

void Deveel.Data.Sql.Compile.CreateViewTests.WithColumns ( )
inline

Definition at line 12 of file CreateViewTests.cs.

12  {
13  const string sql = "CREATE VIEW test_view (a, b, c) AS SELECT * FROM test";
14 
15  var result = Compile(sql);
16  Assert.IsNotNull(result);
17  Assert.IsFalse(result.HasErrors);
18  Assert.AreEqual(1, result.Statements.Count);
19 
20  var statement = result.Statements.First();
21 
22  Assert.IsInstanceOf<CreateViewStatement>(statement);
23 
24  var createView = (CreateViewStatement) statement;
25  Assert.AreEqual("test_view", createView.ViewName);
26  Assert.IsNotEmpty(createView.ColumnNames);
27  Assert.IsNotNull(createView.QueryExpression);
28  Assert.IsFalse(createView.ReplaceIfExists);
29  }
void Deveel.Data.Sql.Compile.CreateViewTests.WithoutColumns ( )
inline

Definition at line 32 of file CreateViewTests.cs.

32  {
33  const string sql = "CREATE VIEW test_view AS SELECT a, c FROM test";
34 
35  var result = Compile(sql);
36  Assert.IsNotNull(result);
37  Assert.IsFalse(result.HasErrors);
38  Assert.AreEqual(1, result.Statements.Count);
39 
40  var statement = result.Statements.First();
41 
42  Assert.IsInstanceOf<CreateViewStatement>(statement);
43 
44  var createView = (CreateViewStatement)statement;
45  Assert.AreEqual("test_view", createView.ViewName);
46  Assert.IsNull(createView.ColumnNames);
47  Assert.IsNotNull(createView.QueryExpression);
48  Assert.IsFalse(createView.ReplaceIfExists);
49  }

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