Exemple #1
0
        public void Check_If_Table_Exists()
        {
            IDbCore db = new PgDbCore("biggy_test");
            bool    existingTablePresent = db.TableExists("Property");
            bool    nonsenseTableExists  = db.TableExists("Nonsense");

            Assert.True(existingTablePresent && !nonsenseTableExists);
        }
        public void Creates_table_with_string_id()
        {
            // The Guitar test object has a string field named simply SKU. This will not be matched
            // without an attribute decoration, and horrible plague and pesilence will result.

            _db.TryDropTable("guitardocuments");
            var  guitarstore = new PgDocumentStore <GuitarDocuments>(_db);
            bool exists      = _db.TableExists(guitarstore.TableName);

            Assert.IsTrue(exists);
        }
Exemple #3
0
        void DropCreateTestTables()
        {
            string BuildingTableSql = ""
                                      + "CREATE TABLE \"Building\" ( \"BIN\" text NOT NULL, \"Identifier\" text, \"PropertyId\" text, CONSTRAINT pk_building_bin PRIMARY KEY (\"BIN\"))";

            _db.TryDropTable("Building");
            if (!_db.TableExists("Building"))
            {
                _db.TransactDDL(BuildingTableSql);
            }
        }
Exemple #4
0
        public void Creates_table_with_int_id()
        {
            // The Widget test object has an int field named Identifier. This will not be matched
            // without an attribute decoration, and horrible plague and pesilence will result. Also,
            // the attribute IsAuto property is set to false, so the field will NOT be a serial key.

            _db.TryDropTable("widgetdocuments");
            var  widgetstore = new PgDocumentStore <WidgetDocuments>(_db);
            bool exists      = _db.TableExists(widgetstore.TableName);

            Assert.IsTrue(exists);
        }
Exemple #5
0
        public void Creates_table_with_string_id()
        {
            // The Instrument test object has an int field named simply Id. Without any
            // Attribute decoration, this should result in a table with a serial int PK.

            // NOTE: Gotta go look to see if the field is a serial in or not...
            //var db = new CommandRunner("chinook");
            _db.TryDropTable("instrumentdocuments");
            var  InstrumentStore = new PgDocumentStore <InstrumentDocuments>(_db);
            bool exists          = _db.TableExists(InstrumentStore.TableName);

            Assert.IsTrue(exists);
        }
 public void Table_Created_Created_for_Pg_Store_With_Biggylist()
 {
     Assert.True(_db.TableExists("propertydocuments"));
 }
Exemple #7
0
 public void Check_If_Table_Exists() {
   IDbCore db = new PgDbCore("biggy_test");
   bool existingTablePresent = db.TableExists("Property");
   bool nonsenseTableExists = db.TableExists("Nonsense");
   Assert.True(existingTablePresent && !nonsenseTableExists);
 }