21 using NUnit.Framework;
23 namespace Deveel.Data.Sql {
27 using (var session = base.CreateAdminSession(database)) {
28 using (var query = session.CreateQuery()) {
34 query.CreateTable(tableInfo1);
35 query.AddPrimaryKey(tn1,
"id");
42 query.CreateTable(tableInfo2);
43 query.AddPrimaryKey(tn2,
"id");
50 return base.CreateAdminSession(database);
56 Assert.DoesNotThrow(() =>
Query.DropTable(tableName));
59 Assert.DoesNotThrow(() => exists =
Query.TableExists(tableName));
60 Assert.IsFalse(exists);
69 Assert.DoesNotThrow(() => exists =
Query.TableExists(tableName));
70 Assert.IsTrue(exists);
75 var tableNames =
new[] {
80 Assert.DoesNotThrow(() =>
Query.DropTables(tableNames));
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
Defines the metadata properties of a column within a table of a database.
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
A database exception that represents a constraint violation.
static NumericType Integer()
Describes the name of an object within a database.
void DropNonReferencedTable()
The representation of a single database in the system.
override ISession CreateAdminSession(IDatabase database)
ForeignKeyAction
Enumerates the foreign key referential trigger actions.
An isolated session to a given database for a given user, encapsulating the transaction for operation...
static DateType DateTime()
void DropReferencedTable()
static StringType String()
Defines the metadata properties of a table existing within a database.