public void Test_CreateTable_Oracle()
        {
            CleanUpCreateDropTestTable();

            var sql = Db <DBForCreateTest> .Sql(db =>
                                                CreateTable(db.table3,
                                                            new Column(db.table3.obj1, DataType.VarChar2(1)),
                                                            new Column(db.table3.obj2, DataType.NVarChar2(1)),
                                                            new Column(db.table3.obj3, DataType.Char(1)),
                                                            new Column(db.table3.obj4, DataType.NChar(1)),
                                                            new Column(db.table3.obj5, DataType.Number(1, 2)),
                                                            new Column(db.table3.obj6, DataType.Binary_Float()),
                                                            new Column(db.table3.obj7, DataType.Binary_Double()),
                                                            new Column(db.table3.obj8, DataType.Date()),
                                                            new Column(db.table3.obj9, DataType.TimeStamp(1)),
                                                            // new Column(db.table3.obj10, DataType.Raw()),
                                                            // new Column(db.table3.obj11, DataType.LongRaw()),
                                                            new Column(db.table3.obj12, DataType.BFile()),
                                                            new Column(db.table3.obj13, DataType.Blob()),
                                                            new Column(db.table3.obj14, DataType.Long()),
                                                            new Column(db.table3.obj15, DataType.Clob()),
                                                            new Column(db.table3.obj16, DataType.NClob()),
                                                            new Column(db.table3.obj17, DataType.XmlType()),
                                                            new Column(db.table3.obj18, DataType.TimeStampWithTimeZone()),
                                                            new Column(db.table3.obj19, DataType.TimeStampWithTimeZone(1))
                                                            ));

            _connection.Execute(sql);
        }
        public void Test_CreateTable_DB2()
        {
            CleanUpCreateDropTestTable();

            var sql = Db <DBForCreateTest> .Sql(db =>
                                                CreateTable(db.table3,
                                                            new Column(db.table3.obj1, DataType.BigInt()),
                                                            new Column(db.table3.obj2, DataType.Binary()),
                                                            new Column(db.table3.obj3, DataType.Blob()),
                                                            new Column(db.table3.obj4, DataType.Char(1)),
                                                            new Column(db.table3.obj5, DataType.Clob()),
                                                            // new Column(db.table3.obj6, DataType.Currency()),
                                                            new Column(db.table3.obj7, DataType.Date()),
                                                            // new Column(db.table3.obj8, DataType.DateTime()),
                                                            new Column(db.table3.obj9, DataType.DbClob()),
                                                            new Column(db.table3.obj10, DataType.Double()),
                                                            new Column(db.table3.obj11, DataType.Float()),
                                                            new Column(db.table3.obj12, DataType.Graphic()),
                                                            new Column(db.table3.obj13, DataType.Int()),
                                                            new Column(db.table3.obj14, DataType.Integer()),
                                                            // new Column(db.table3.obj15, DataType.LongVarchar(1)),
                                                            // new Column(db.table3.obj16, DataType.LongVarGraphic()),
                                                            new Column(db.table3.obj17, DataType.Numeric()),
                                                            new Column(db.table3.obj18, DataType.Real()),
                                                            new Column(db.table3.obj19, DataType.SmallInt()),
                                                            // new Column(db.table3.obj20, DataType.Text()),
                                                            new Column(db.table3.obj21, DataType.Time()),
                                                            new Column(db.table3.obj22, DataType.TimeStamp()),
                                                            new Column(db.table3.obj23, DataType.VarChar(1))
                                                            // new Column(db.table3.obj24, DataType.VarGraphic())
                                                            ));

            _connection.Execute(sql);
        }
Esempio n. 3
0
        public void Test_CreateTable_SQLite()
        {
            CleanUpCreateDropTestTable();

            var sql = Db <DBForCreateTest> .Sql(db =>
                                                CreateTable(db.table3,
                                                            new Column(db.table3.obj1, DataType.Int()),
                                                            new Column(db.table3.obj2, DataType.Integer()),
                                                            new Column(db.table3.obj3, DataType.TinyInt()),
                                                            new Column(db.table3.obj4, DataType.SmallInt()),
                                                            new Column(db.table3.obj5, DataType.MediumInt()),
                                                            new Column(db.table3.obj6, DataType.BigInt()),
                                                            new Column(db.table3.obj7, DataType.UnsignedBigInt()),
                                                            new Column(db.table3.obj8, DataType.Int2()),
                                                            new Column(db.table3.obj9, DataType.Int8()),
                                                            new Column(db.table3.obj10, DataType.Character(1)),
                                                            new Column(db.table3.obj11, DataType.VarChar(1)),
                                                            new Column(db.table3.obj12, DataType.VaryingCharacter(1)),
                                                            new Column(db.table3.obj13, DataType.NChar(1)),
                                                            new Column(db.table3.obj14, DataType.NativeCharacter(1)),
                                                            new Column(db.table3.obj15, DataType.NVarChar()),
                                                            new Column(db.table3.obj16, DataType.Text()),
                                                            new Column(db.table3.obj17, DataType.Clob()),
                                                            new Column(db.table3.obj18, DataType.Blob()),
                                                            new Column(db.table3.obj19, DataType.Real()),
                                                            new Column(db.table3.obj20, DataType.Double()),
                                                            new Column(db.table3.obj21, DataType.DoublePrecision()),
                                                            new Column(db.table3.obj22, DataType.Float()),
                                                            new Column(db.table3.obj23, DataType.Numeric()),
                                                            new Column(db.table3.obj24, DataType.Decimal()),//(10, 5)
                                                            new Column(db.table3.obj25, DataType.Boolean()),
                                                            new Column(db.table3.obj26, DataType.Date()),
                                                            new Column(db.table3.obj27, DataType.DateTime())
                                                            ));

            _connection.Execute(sql);
        }