Definition at line 29 of file AlterTableStatementTests.cs.
void Deveel.Data.Sql.Statements.AlterTableStatementTests.AlterTableAddColumn |
( |
| ) |
|
|
inline |
Definition at line 49 of file AlterTableStatementTests.cs.
50 const string sql =
"ALTER TABLE test_table ADD COLUMN reserved BOOLEAN";
52 IEnumerable<SqlStatement> statements = null;
53 Assert.DoesNotThrow(() => statements = SqlStatement.Parse(sql));
54 Assert.IsNotNull(statements);
56 var list = statements.ToList();
58 Assert.AreEqual(1, list.Count);
60 var statement = list[0];
62 Assert.IsNotNull(statement);
63 Assert.IsInstanceOf<AlterTableStatement>(statement);
66 Assert.DoesNotThrow(() => result = statement.Execute(
Query));
67 Assert.IsNotNull(result);
68 Assert.AreEqual(1, result.RowCount);
69 Assert.AreEqual(1, result.TableInfo.ColumnCount);
70 Assert.AreEqual(0, ((
SqlNumber) result.GetValue(0,0).Value).ToInt32());
72 var testTable =
Query.GetTable(
new ObjectName(
"test_table"));
74 Assert.IsNotNull(testTable);
75 Assert.AreEqual(6, testTable.TableInfo.ColumnCount);
Defines the contract to access the data contained into a table of a database.
void Deveel.Data.Sql.Statements.AlterTableStatementTests.CreateTestTable |
( |
| ) |
|
|
inlineprivate |
Definition at line 34 of file AlterTableStatementTests.cs.
35 var tableInfo =
new TableInfo(ObjectName.Parse(
"APP.test_table"));
44 Query.CreateTable(tableInfo);
45 Query.AddPrimaryKey(tableInfo.TableName,
"id",
"PK_TEST_TABLE");
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static BooleanType Boolean()
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 DateType DateTime()
static SqlReferenceExpression Reference(ObjectName objectName)
static StringType String()
Defines the base class for instances that represent SQL expression tree nodes.
static SqlFunctionCallExpression FunctionCall(ObjectName functionName)
Defines the metadata properties of a table existing within a database.
override void Deveel.Data.Sql.Statements.AlterTableStatementTests.OnSetUp |
( |
string |
testName | ) |
|
|
inlineprotectedvirtual |
The documentation for this class was generated from the following file: