Definition at line 27 of file CreateViewStatementTests.cs.
override ISession Deveel.Data.Sql.Statements.CreateViewStatementTests.CreateAdminSession |
( |
IDatabase |
database | ) |
|
|
inlineprotectedvirtual |
Reimplemented from Deveel.Data.ContextBasedTest.
Definition at line 29 of file CreateViewStatementTests.cs.
30 using (var session = base.CreateAdminSession(database)) {
31 using (var query = session.CreateQuery()) {
32 var tableInfo =
new TableInfo(ObjectName.Parse(
"APP.test_table"));
36 query.CreateTable(tableInfo,
false,
false);
41 return base.CreateAdminSession(database);
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static NumericType Integer()
void AddColumn(ColumnInfo column)
Adds a new column to the table at the last position of the columns list in the table metadata...
static StringType String()
Defines the metadata properties of a table existing within a database.
void Deveel.Data.Sql.Statements.CreateViewStatementTests.ExecuteSimpleCreateView |
( |
| ) |
|
|
inline |
Definition at line 97 of file CreateViewStatementTests.cs.
98 const string sql =
"CREATE VIEW text_view1 AS SELECT * FROM test_table WHERE a = 1";
100 IEnumerable<SqlStatement> statements = null;
101 Assert.DoesNotThrow(() => statements = SqlStatement.Parse(sql));
102 Assert.IsNotNull(statements);
104 var list = statements.ToList();
106 Assert.AreEqual(1, list.Count);
108 var statement = list[0];
110 Assert.IsNotNull(statement);
111 Assert.IsInstanceOf<CreateViewStatement>(statement);
114 Assert.DoesNotThrow(() => result = statement.Execute(
Query));
115 Assert.IsNotNull(result);
116 Assert.AreEqual(1, result.RowCount);
Defines the contract to access the data contained into a table of a database.
void Deveel.Data.Sql.Statements.CreateViewStatementTests.ParseCreateViewWithColumns |
( |
| ) |
|
|
inline |
Definition at line 65 of file CreateViewStatementTests.cs.
66 const string sql =
"CREATE VIEW text_view1 (a, b, c) AS SELECT * FROM test_table WHERE a = 1";
68 IEnumerable<SqlStatement> statements = null;
69 Assert.DoesNotThrow(() => statements = SqlStatement.Parse(sql));
70 Assert.IsNotNull(statements);
72 var statementList = statements.ToList();
73 Assert.IsNotEmpty(statementList);
74 Assert.AreEqual(1, statementList.Count);
75 Assert.IsInstanceOf<CreateViewStatement>(statementList[0]);
77 var createView = (CreateViewStatement)statementList[0];
void Deveel.Data.Sql.Statements.CreateViewStatementTests.ParseCreateViewWithOrReplace |
( |
| ) |
|
|
inline |
Definition at line 81 of file CreateViewStatementTests.cs.
82 const string sql =
"CREATE OR REPLACE VIEW text_view1 AS SELECT * FROM test_table WHERE a = 1";
84 IEnumerable<SqlStatement> statements = null;
85 Assert.DoesNotThrow(() => statements = SqlStatement.Parse(sql));
86 Assert.IsNotNull(statements);
88 var statementList = statements.ToList();
89 Assert.IsNotEmpty(statementList);
90 Assert.AreEqual(1, statementList.Count);
91 Assert.IsInstanceOf<CreateViewStatement>(statementList[0]);
93 var createView = (CreateViewStatement)statementList[0];
void Deveel.Data.Sql.Statements.CreateViewStatementTests.ParseSimpleCreateView |
( |
| ) |
|
|
inline |
Definition at line 45 of file CreateViewStatementTests.cs.
46 const string sql =
"CREATE VIEW text_view1 AS SELECT * FROM test_table WHERE a = 1";
48 var statements = SqlStatement.Parse(sql);
49 Assert.IsNotNull(statements);
51 var statementList = statements.ToList();
52 Assert.IsNotEmpty(statementList);
53 Assert.AreEqual(1, statementList.Count);
54 Assert.IsInstanceOf<CreateViewStatement>(statementList[0]);
56 var createView = (CreateViewStatement) statementList[0];
57 Assert.IsNotNull(createView.SourceQuery);
58 Assert.IsTrue(createView.IsFromQuery);
60 Assert.IsNotNull(createView.ViewName);
The documentation for this class was generated from the following file: