Package org.gdbms.engine.data

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


    public void testUndoOrRedoClearsSelection() throws Exception {
        DataSource d = ds.getDataSource("persona", DataSourceFactory.UNDOABLE);
       
        d.beginTrans();
        d.setSelectedRows(new int[]{0});
        d.insertFilledRow(d.getRow(0));
        int[] sel = d.getSelectedRows();
        assertTrue(sel.length == 1);
        assertTrue(sel[0] == 0);
        d.undo();
        assertTrue(d.getSelectedRows().length == 0);
View Full Code Here


    Value v4 = ValueFactory.createValue(Date.valueOf("1998-09-05"));
    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());
View Full Code Here

        Value v4 = ValueFactory.createValue(Date.valueOf("1998-09-05"));
        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.setFieldValue(0, 1, ValueFactory.createNullValue());
        d.commitTrans();

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

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

       
        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 {
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"));
    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 {
View Full Code Here

        Value v2 = ValueFactory.createValue("Gonz�lez");

        DataSource d = ds.getDataSource("persona_created");

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

    assertTrue(d.isModified());
    d.rollBackTrans();

    d.beginTrans();
    assertFalse(d.isModified());
    d.insertFilledRow(d.getRow(0));
    assertTrue(d.isModified());
    d.rollBackTrans();

    d.beginTrans();
    assertFalse(d.isModified());
View Full Code Here

      throws Exception {
    DataSource d = ds.getDataSource(pgds);

    d.beginTrans();
    long countBefore = d.getRowCount();
    d.insertFilledRow(new Value[] { ValueFactory.createValue(55),
        ValueFactory.createValue(55),
        GeometryFactory.createPoint2D(0, 0) });
    d.commitTrans();

    d.start();
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.