override ISession Deveel.Data.Sql.Statements.DeclareCursorStatementTests.CreateAdminSession |
( |
IDatabase |
database | ) |
|
|
inlineprotectedvirtual |
Reimplemented from Deveel.Data.ContextBasedTest.
Definition at line 27 of file DeclareCursorStatementTests.cs.
28 using (var session = base.CreateAdminSession(database)) {
29 using (var query = session.CreateQuery()) {
30 var tableInfo =
new TableInfo(ObjectName.Parse(
"APP.test_table"));
34 query.CreateTable(tableInfo,
false,
false);
39 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.DeclareCursorStatementTests.DeclareCursorWithArguments |
( |
| ) |
|
|
inline |
Definition at line 61 of file DeclareCursorStatementTests.cs.
62 const string sql =
"DECLARE CURSOR c1 (arg1 INT, arg2 VARCHAR) IS SELECT * FROM test_table WHERE a = arg1";
64 var statements = SqlStatement.Parse(sql);
65 Assert.IsNotNull(statements);
67 var statementList = statements.ToList();
68 Assert.IsNotEmpty(statementList);
69 Assert.AreEqual(1, statementList.Count);
70 Assert.IsInstanceOf<DeclareCursorStatement>(statementList[0]);
72 var statement = (DeclareCursorStatement)statementList[0];
73 Assert.AreEqual(
"c1", statement.CursorName);
74 Assert.IsNotEmpty(statement.Parameters);
76 var arg1 = statement.Parameters.First();
77 Assert.IsNotNull(arg1);
78 Assert.AreEqual(
"arg1", arg1.ParameterName);
79 Assert.IsInstanceOf<
NumericType>(arg1.ParameterType);
80 Assert.AreEqual(0, arg1.Offset);
void Deveel.Data.Sql.Statements.DeclareCursorStatementTests.DeclareInsensitiveCursor_NoArguments |
( |
| ) |
|
|
inline |
Definition at line 43 of file DeclareCursorStatementTests.cs.
44 const string sql =
"DECLARE CURSOR c1 INSENSITIVE IS SELECT * FROM test_table WHERE a = 1";
46 var statements = SqlStatement.Parse(sql);
47 Assert.IsNotNull(statements);
49 var statementList = statements.ToList();
50 Assert.IsNotEmpty(statementList);
51 Assert.AreEqual(1, statementList.Count);
52 Assert.IsInstanceOf<DeclareCursorStatement>(statementList[0]);
54 var statement = (DeclareCursorStatement) statementList[0];
55 Assert.AreEqual(
"c1", statement.CursorName);
56 Assert.AreNotEqual(0, (statement.Flags &
CursorFlags.Insensitive));
57 Assert.IsEmpty(statement.Parameters);
The documentation for this class was generated from the following file: