Package org.tmatesoft.sqljet.core.internal.schema

Examples of org.tmatesoft.sqljet.core.internal.schema.SqlJetTableDef


        assertEquals(SqlJetTypeAffinity.NUMERIC, SqlJetTypeAffinity.decode("byte"));
    }

    public void testSchema() throws SqlJetException {
        String sql = "create table t (c1 int primary key, c2 varchar, c3 super double, c4 short unique, c5 blob, c6)";
        ISqlJetTableDef table = new SqlJetTableDef(parse(sql), 0);
        ISqlJetColumnDef c1 = table.getColumn("c1");
        assertEquals(SqlJetTypeAffinity.INTEGER, c1.getTypeAffinity());
        ISqlJetColumnDef c2 = table.getColumn("c2");
        assertEquals(SqlJetTypeAffinity.TEXT, c2.getTypeAffinity());
        ISqlJetColumnDef c3 = table.getColumn("c3");
        assertEquals(SqlJetTypeAffinity.REAL, c3.getTypeAffinity());
        ISqlJetColumnDef c4 = table.getColumn("c4");
        assertEquals(SqlJetTypeAffinity.NUMERIC, c4.getTypeAffinity());
        ISqlJetColumnDef c5 = table.getColumn("c5");
        assertEquals(SqlJetTypeAffinity.NONE, c5.getTypeAffinity());
        ISqlJetColumnDef c6 = table.getColumn("c6");
        assertEquals(SqlJetTypeAffinity.NONE, c6.getTypeAffinity());
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.schema.SqlJetTableDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.