Package org.gdbms.engine.data

Examples of org.gdbms.engine.data.DataSource.start()


   
    public void testDistinctAllFields() throws Exception {
        DataSource d = ds.executeSQL(
                "select distinct * from sort ;");
       
        d.start();
        assertTrue(d.getRowCount() == 4);
        assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(ValueFactory.createValue(0))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue(1))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(1, 0).equals(ValueFactory.createValue(0))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(1, 1).equals(ValueFactory.createValue(3))).getValue());
View Full Code Here


     * @throws DriverLoadException
     */
    private void doTestNullValues(String dsName)
        throws NoSuchTableException, DriverException, DriverLoadException, DataSourceCreationException {
        DataSource d = ds.getDataSource(dsName);
        d.start();

        for (int i = 0; i < d.getRowCount(); i++) {
            for (int j = 0; j < d.getDataSourceMetadata().getFieldCount(); j++) {
                assertTrue(d.getFieldValue(i, j) != null);
                assertFalse(d.getFieldValue(i, j).toString().equals("'null'"));
View Full Code Here

     *
     * @throws Throwable DOCUMENT ME!
     */
    public void testUnion() throws Throwable {
      DataSource d = ds.executeSQL("(select id, nombre, apellido from persona) union (select  id, nombre, apellido from persona);");
      d.start();
      String aux = d.getAsString();
      d.stop();
   
      FileInputStream fis = new FileInputStream("src/test/resources/union.txt");
      byte[] correcto = new byte[aux.getBytes().length];
View Full Code Here

     * @throws Throwable DOCUMENT ME!
     */
    public void testSelect() throws Throwable {
      DataSource d = ds.executeSQL("select apellido from persona where nombre='fernando';");
   
      d.start();
      String aux = d.getAsString();
      d.stop();
   
      FileInputStream fis = new FileInputStream("src/test/resources/select.txt");
      byte[] correcto = new byte[aux.getBytes().length];
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.