Package org.gdbms.engine.data

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


        assertTrue(((BooleanValue)d.getFieldValue(1, 1).equals(ValueFactory.createValue(3))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(2, 0).equals(ValueFactory.createValue(0))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(2, 1).equals(ValueFactory.createValue(0))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(3, 0).equals(ValueFactory.createValue(2))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(3, 1).equals(ValueFactory.createValue(1))).getValue());
        d.stop();
    }
}
View Full Code Here


                assertTrue(d.getFieldValue(i, j) != null);
                assertFalse(d.getFieldValue(i, j).toString().equals("'null'"));
            }
        }

        d.stop();
    }

    /**
     * Tests the DataSources never return null instead of NullValue
     *
 
View Full Code Here

     */
    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];
      fis.read(correcto);
      fis.close();
View Full Code Here

    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];
      fis.read(correcto);
      fis.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.