Package org.apache.metamodel.create

Examples of org.apache.metamodel.create.ColumnCreationBuilder.execute()


        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.FLOAT).withColumn("code").ofType(ColumnType.VARCHAR).ofSize(10);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1.0).value("code", "C01").execute();
                cb.insertInto(table).value("id", 2.0).value("code", "C02").execute();
                cb.insertInto(table).value("id", 3.0).value("code", null).execute();
                cb.insertInto(table).value("id", 4.0).value("code", "C02").execute();
View Full Code Here


        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.FLOAT).withColumn("code").ofType(ColumnType.VARCHAR).ofSize(10);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1.0).value("code", "C01").execute();
                cb.insertInto(table).value("id", 2.0).value("code", "C02").execute();
                cb.insertInto(table).value("id", 3.0).value("code", null).execute();
                cb.insertInto(table).value("id", 4.0).value("code", "C04").execute();
View Full Code Here

            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.INTEGER).withColumn("code").ofType(ColumnType.CHAR).ofSize(1);
                String sql = createTableBuilder.toSql();
                assertTrue(sql, sql.indexOf("test_table (id INTEGER,code CHAR(1))") != -1);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1).value("code", 'P').execute();
                cb.insertInto(table).value("id", 2).value("code", 'O').execute();
                cb.insertInto(table).value("id", 3).value("code", null).execute();
            }
View Full Code Here

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.FLOAT).withColumn("code").ofType(ColumnType.VARCHAR).ofSize(10);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1.0).value("code", "C01").execute();
                cb.insertInto(table).value("id", 2.0).value("code", "C02").execute();
                cb.insertInto(table).value("id", 3.0).value("code", null).execute();
                cb.insertInto(table).value("id", 4.0).value("code", "C02").execute();
View Full Code Here

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.FLOAT).withColumn("code").ofType(ColumnType.VARCHAR).ofSize(10);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1.0).value("code", "C01").execute();
                cb.insertInto(table).value("id", 2.0).value("code", "C02").execute();
                cb.insertInto(table).value("id", 3.0).value("code", null).execute();
                cb.insertInto(table).value("id", 4.0).value("code", "C04").execute();
View Full Code Here

            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.INTEGER).withColumn("code").ofType(ColumnType.CHAR).ofSize(1);
                String sql = createTableBuilder.toSql();
                assertTrue(sql, sql.indexOf("test_table (id INTEGER,code CHAR(1))") != -1);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1).value("code", 'P').execute();
                cb.insertInto(table).value("id", 2).value("code", 'O').execute();
                cb.insertInto(table).value("id", 3).value("code", null).execute();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.