Definition at line 11 of file CreateTableTests.cs.
void Deveel.Data.Sql.Compile.CreateTableTests.SimpleTable |
( |
| ) |
|
|
inline |
Definition at line 13 of file CreateTableTests.cs.
14 const string sql =
"CREATE TABLE test (a INT NOT NULL, b VARCHAR NULL)";
17 Assert.IsNotNull(result);
18 Assert.IsFalse(result.HasErrors);
19 Assert.AreEqual(1, result.Statements.Count);
23 Assert.IsNotNull(statement);
28 Assert.IsNotNullOrEmpty(createTable.TableName);
29 Assert.AreEqual(
"test", createTable.TableName);
30 Assert.IsFalse(createTable.Temporary);
31 Assert.IsFalse(createTable.IfNotExists);
33 Assert.AreEqual(2, createTable.Columns.Count);
34 Assert.AreEqual(
"a", createTable.Columns[0].ColumnName);
35 Assert.IsTrue(createTable.Columns[0].IsNotNull);
37 Assert.AreEqual(
"b", createTable.Columns[1].ColumnName);
38 Assert.IsFalse(createTable.Columns[1].IsNotNull);
The statement object used to create a table in a database.
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.CreateTableTests.WithColumnConstraints |
( |
| ) |
|
|
inline |
Definition at line 116 of file CreateTableTests.cs.
117 const string sql =
"CREATE TABLE test (id INT NOT NULL PRIMARY KEY)";
120 Assert.IsNotNull(result);
121 Assert.IsFalse(result.HasErrors);
122 Assert.AreEqual(2, result.Statements.Count);
129 Assert.IsNotNull(statement);
134 Assert.IsNotNullOrEmpty(createTable.TableName);
135 Assert.AreEqual(
"test", createTable.TableName);
The statement object used to create a table in a database.
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.CreateTableTests.WithColumnDefault |
( |
| ) |
|
|
inline |
Definition at line 69 of file CreateTableTests.cs.
70 const string sql =
"CREATE TABLE test (a VARCHAR DEFAULT 'one')";
73 Assert.IsNotNull(result);
74 Assert.IsFalse(result.HasErrors);
75 Assert.AreEqual(1, result.Statements.Count);
79 Assert.IsNotNull(statement);
84 Assert.IsNotNullOrEmpty(createTable.TableName);
85 Assert.AreEqual(
"test", createTable.TableName);
87 Assert.AreEqual(1, createTable.Columns.Count);
88 Assert.IsNotNull(createTable.Columns[0].DefaultExpression);
The statement object used to create a table in a database.
SqlCompileResult Compile(string sql)
An expression that holds a constant value.
void Deveel.Data.Sql.Compile.CreateTableTests.WithConstraints |
( |
| ) |
|
|
inline |
Definition at line 93 of file CreateTableTests.cs.
94 const string sql =
"CREATE TABLE test (id INT NOT NULL, UNIQUE(id))";
97 Assert.IsNotNull(result);
98 Assert.IsFalse(result.HasErrors);
99 Assert.AreEqual(2, result.Statements.Count);
106 Assert.IsNotNull(statement);
111 Assert.IsNotNullOrEmpty(createTable.TableName);
112 Assert.AreEqual(
"test", createTable.TableName);
The statement object used to create a table in a database.
SqlCompileResult Compile(string sql)
void Deveel.Data.Sql.Compile.CreateTableTests.WithIdentityColumn |
( |
| ) |
|
|
inline |
Definition at line 42 of file CreateTableTests.cs.
43 const string sql =
"CREATE TABLE test (id INT IDENTITY, name VARCHAR NOT NULL)";
46 Assert.IsNotNull(result);
47 Assert.IsFalse(result.HasErrors);
48 Assert.AreEqual(1, result.Statements.Count);
52 Assert.IsNotNull(statement);
57 Assert.IsNotNullOrEmpty(createTable.TableName);
58 Assert.AreEqual(
"test", createTable.TableName);
59 Assert.IsFalse(createTable.Temporary);
60 Assert.IsFalse(createTable.IfNotExists);
62 Assert.AreEqual(2, createTable.Columns.Count);
63 Assert.IsTrue(createTable.Columns[0].IsIdentity);
64 Assert.IsNotNull(createTable.Columns[0].DefaultExpression);
The statement object used to create a table in a database.
SqlCompileResult Compile(string sql)
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Sql.Compile/CreateTableTests.cs