Examples of commitTrans()


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

        Value v6 = ValueFactory.createValue(Timestamp.valueOf("2005-09-05 4:30:01.666666666"));

        d.beginTrans();
        d.insertFilledRow(new Value[] {v1, v2, v3, v4, v5, v6});
        d.setFieldValue(0, 1, ValueFactory.createNullValue());
        d.commitTrans();

        d.start();
        assertTrue(((BooleanValue) d.getFieldValue(3, 0).equals(v1)).getValue());
        assertTrue(((BooleanValue) ValueFactory.createValue(d.getFieldValue(3, 1) instanceof NullValue)).getValue());
        assertTrue(((BooleanValue) d.getFieldValue(3, 2).equals(v3)).getValue());
View Full Code Here

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

       
        d.beginTrans();
        int rc = (int) d.getRowCount();
        d.insertFilledRow(new Value[] {v1, v2, v3, v4, v5, v6});
        assertTrue(d.getRowCount() == rc+1);
        d.commitTrans();
    }
   
    public void testRowCountFakeTransaction() throws Exception {
        testRowCount("hsqldbpersona", DataSource.COHERENT_ROW_ORDER);
        testRowCount("persona", DataSource.COHERENT_ROW_ORDER);
View Full Code Here

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

    Value v7 = ValueFactory.createValue(3);
   
    d.beginTrans();
    d.insertFilledRow(new Value[] {v1, v2, v3, v4, v5, v6, v7});
    d.setFieldValue(0, 1, ValueFactory.createNullValue());
    d.commitTrans();
    }
   
    public void testEditingDatesFakeTransaction() throws Exception {
      testEditingDates("hsqldbpersona", DataSource.COHERENT_ROW_ORDER);
      testEditingDates("persona", DataSource.COHERENT_ROW_ORDER);
View Full Code Here

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

    public void testAutomaticDataSource() throws Exception{
    DataSource d = ds.getDataSource("persona");

        d.beginTrans();
        d.setFieldValue(0, 1, ValueFactory.createValue("la gacela"));
        d.commitTrans();
       
    d = ds.getDataSource("hsqldbpersona");

        d.beginTrans();
        d.setFieldValue(0, 1, ValueFactory.createValue("la gacela"));
View Full Code Here

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

       
    d = ds.getDataSource("hsqldbpersona");

        d.beginTrans();
        d.setFieldValue(0, 1, ValueFactory.createValue("la gacela"));
        d.commitTrans();
       
    assertTrue(true);
    }
   
    public void testFileCreation() throws Exception {
View Full Code Here

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

        d.insertFilledRow(new Value[]{
                v1,
                v2,
                ValueFactory.createValue(0L)
        });
        d.commitTrans();

        d.start();
        assertTrue(d.getRowCount() == 1);
        assertTrue(d.getDataSourceMetadata().getFieldCount() == 2);
        assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(v1)).getValue());
View Full Code Here

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

    }
    Value nv2 = ValueFactory.createValue(3.0);
    d.insertEmptyRow();
    d.setFieldValue(d.getRowCount() - 1, 0, geom);
    d.setFieldValue(d.getRowCount() - 1, 1, nv2);
    d.commitTrans();

    d = ds.getDataSource(dsName);
    d.start();
    for (int i = 0; i < previous.length; i++) {
      for (int j = 0; j < previous[i].length; j++) {
View Full Code Here

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

    d.setFieldValue(1, 1, ValueFactory.createValue("edicion2"));
    d.setFieldValue(1, 2, ValueFactory.createValue("edicion2"));
    d.setFieldValue(3, 1, ValueFactory.createValue("edicion3"));
    d.setFieldValue(3, 0, ValueFactory.createValue(3));

    d.commitTrans();

    d = ds.getDataSource(dsName);
    d.start();
    assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(ValueFactory.createValue(0))).getValue());
    assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue("edicion1"))).getValue());
View Full Code Here

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

    for (int i = 0; i < n; i++) {
      d.insertEmptyRow();
      d.setFieldValue(d.getRowCount() - 1, 0, geom);
      d.setFieldValue(d.getRowCount() - 1, 1, nv2);
    }
    d.commitTrans();

    d = ds.getDataSource("big");
    d.start();
    assertTrue(d.getRowCount() == n);
    for (int i = 0; i < n; i++) {
View Full Code Here

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

  private void testUpdatePK(String dsName, int mode) throws Exception{
    DataSource d = ds.getDataSource(dsName);

    d.beginTrans();
    d.setFieldValue(0, 0, ValueFactory.createValue(10));
    d.commitTrans();

    d = ds.executeSQL("select * from " + dsName + " where ID = 10;");
    d.start();
    assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(ValueFactory.createValue(10))).getValue());
    d.stop();
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.