Package org.apache.metamodel

Examples of org.apache.metamodel.DataContext.executeQuery()


        Table table = dc.getDefaultSchema().getTables()[0];
        MutableColumn col = (MutableColumn) table.getColumns()[0];
        Query q = dc.query().from(table).select(col).toQuery();
        assertEquals("SELECT csv_only_number_one.csv.number FROM resources.csv_only_number_one.csv", q.toSql());

        DataSet ds = dc.executeQuery(q);
        while (ds.next()) {
            assertEquals(true, ds.getRow().getValue(0));
        }
        ds.close();
View Full Code Here


        }
        ds.close();

        dc = Converters.addTypeConverter(dc, col, new StringToIntegerConverter());

        ds = dc.executeQuery(q);
        while (ds.next()) {
            assertEquals(1, ds.getRow().getValue(0));
        }
        ds.close();
    }
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.