Search in sources :

Example 46 with TableModel

use of com.github.drinkjava2.jdialects.model.TableModel in project jDialects by drinkjava2.

the class ColumnDDLTest method tableModel.

private static Table tableModel() {
    Table t = new Table(testTable);
    t.column("b1").BOOLEAN();
    t.column("d2").DOUBLE();
    t.column("f3").FLOAT();
    t.column("i4").INTEGER().pkey().unique().notNull().defaultValue("1");
    t.column("l5").LONG();
    t.column("s6").SHORT();
    t.column("b7").BIGDECIMAL(10, 2);
    t.column("s8").STRING(20);
    t.column("d9").DATE();
    t.column("t10").TIME();
    t.column("t11").TIMESTAMP();
    t.column("v12").VARCHAR(300);
    return t;
}
Also used : Table(com.github.drinkjava2.jdialects.model.Table)

Aggregations

TableModel (com.github.drinkjava2.jdialects.model.TableModel)36 Test (org.junit.Test)19 ColumnModel (com.github.drinkjava2.jdialects.model.ColumnModel)11 AutoIdGenerator (com.github.drinkjava2.jdialects.id.AutoIdGenerator)9 IdGenerator (com.github.drinkjava2.jdialects.id.IdGenerator)9 SequenceIdGenerator (com.github.drinkjava2.jdialects.id.SequenceIdGenerator)5 TableIdGenerator (com.github.drinkjava2.jdialects.id.TableIdGenerator)5 FKeyModel (com.github.drinkjava2.jdialects.model.FKeyModel)5 IndexModel (com.github.drinkjava2.jdialects.model.IndexModel)3 UniqueModel (com.github.drinkjava2.jdialects.model.UniqueModel)3 SQLException (java.sql.SQLException)3 ArrayList (java.util.ArrayList)3 Dialect (com.github.drinkjava2.jdialects.Dialect)2 Connection (java.sql.Connection)2 Map (java.util.Map)2 SortedUUIDGenerator (com.github.drinkjava2.jdialects.id.SortedUUIDGenerator)1 Table (com.github.drinkjava2.jdialects.model.Table)1 HikariDataSource (com.zaxxer.hikari.HikariDataSource)1 BeanInfo (java.beans.BeanInfo)1 PropertyDescriptor (java.beans.PropertyDescriptor)1