Definition at line 11 of file AlterTableCompileTests.cs.
void Deveel.Data.Sql.Compile.AlterTableCompileTests.AddColumn |
( |
| ) |
|
|
inline |
Definition at line 13 of file AlterTableCompileTests.cs.
14 const string sql =
"ALTER TABLE test ADD COLUMN b INT NOT NULL";
17 Assert.IsNotNull(result);
18 Assert.IsFalse(result.HasErrors);
19 Assert.IsNotEmpty(result.Statements);
20 Assert.AreEqual(1, result.Statements.Count);
22 var statement = result.Statements.First();
24 Assert.IsNotNull(statement);
29 Assert.AreEqual(
"test", alterStatement.TableName.FullName);
33 Assert.AreEqual(
"b", alterAction.Column.ColumnName);
34 Assert.IsInstanceOf<
NumericType>(alterAction.Column.ColumnType);
35 Assert.IsTrue(alterAction.Column.IsNotNull);
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.AlterTableCompileTests.AddColumnsAndUniqeContraints |
( |
| ) |
|
|
inline |
Definition at line 51 of file AlterTableCompileTests.cs.
52 const string sql =
"ALTER TABLE test ADD COLUMN b INT NOT NULL ADD CONSTRAINT c UNIQUE(a, b)";
55 Assert.IsNotNull(result);
56 Assert.IsFalse(result.HasErrors);
57 Assert.IsNotEmpty(result.Statements);
58 Assert.AreEqual(2, result.Statements.Count);
60 var firstStatement = result.Statements.ElementAt(0);
61 var secondStatement = result.Statements.ElementAt(1);
63 Assert.IsNotNull(firstStatement);
64 Assert.IsNotNull(secondStatement);
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.AlterTableCompileTests.AddMultipleColumns |
( |
| ) |
|
|
inline |
Definition at line 40 of file AlterTableCompileTests.cs.
41 const string sql =
"ALTER TABLE test ADD COLUMN b INT NOT NULL ADD c VARCHAR DEFAULT 'test'";
44 Assert.IsNotNull(result);
45 Assert.IsFalse(result.HasErrors);
46 Assert.IsNotEmpty(result.Statements);
47 Assert.AreEqual(2, result.Statements.Count);
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.AlterTableCompileTests.AddPrimaryKeyContraint |
( |
| ) |
|
|
inline |
Definition at line 77 of file AlterTableCompileTests.cs.
78 const string sql =
"ALTER TABLE test ADD CONSTRAINT c PRIMARY KEY(id)";
81 Assert.IsNotNull(result);
82 Assert.IsFalse(result.HasErrors);
83 Assert.IsNotEmpty(result.Statements);
84 Assert.AreEqual(1, result.Statements.Count);
86 var statement = result.Statements.First();
88 Assert.IsNotNull(statement);
93 Assert.AreEqual(
"test", alterStatement.TableName.FullName);
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.AlterTableCompileTests.DropColumn |
( |
| ) |
|
|
inline |
Definition at line 98 of file AlterTableCompileTests.cs.
99 const string sql =
"ALTER TABLE test DROP COLUMN b";
102 Assert.IsNotNull(result);
103 Assert.IsFalse(result.HasErrors);
104 Assert.IsNotEmpty(result.Statements);
105 Assert.AreEqual(1, result.Statements.Count);
107 var statement = result.Statements.ElementAt(0);
SqlCompileResult Compile(string sql)
The documentation for this class was generated from the following file: