Package org.gdbms.engine.data

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


        assertTrue(sel.length == 1);
        assertTrue(sel[0] == 0);
        d.undo();
        assertTrue(d.getSelectedRows().length == 0);
       
        d.commitTrans();
    }
}
View Full Code Here


    DataSource d = ds.getDataSource(dsName);

    d.beginTrans();
    d.insertEmptyRow();
        d.setFieldValue(3, 0, ValueFactory.createValue(5));
    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("fernando"))).getValue());
View Full Code Here

    Value value = ValueFactory.createValue("aaa'aaa");
   
    d.beginTrans();
    d.setFieldValue(0, 1, value);
    d.commitTrans();

    d.start();
    assertTrue(((BooleanValue) d.getFieldValue(0, 1).equals(value)).getValue());
    d.stop();
    }
View Full Code Here

    Value v5 = ValueFactory.createValue(Time.valueOf("4:30:01"));
    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.commitTrans();

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

        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

       
        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

    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

    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

       
    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

        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

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.