Package org.gdbms.engine.data

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


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

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


      for (int j = 0; j < previous[i].length; j++) {
        previous[i][j] = d.getFieldValue(i, j);
      }
    }
    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);
View Full Code Here

    gpx.lineTo(10, 15);
    Geometry geom = GeometryFactory.createPolyline2D(gpx);
    Value nv2 = ValueFactory.createValue(3.0);
    int n = 10000;
    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();
View Full Code Here

  private void testIsModified(String dsName) throws Exception {
    DataSource d = ds.getDataSource(dsName);

    d.beginTrans();
    assertFalse(d.isModified());
    d.insertEmptyRow();
    assertTrue(d.isModified());
    d.rollBackTrans();

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

    d.setFieldValue(0, 0, ValueFactory.createValue(10));
    assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(ValueFactory.createValue(10))).getValue());
    assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue("fernando"))).getValue());
    d.setFieldValue(0, 1, ValueFactory.createValue("nombre"));
    assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue("nombre"))).getValue());
    d.insertEmptyRow();
    assertTrue(d.getFieldValue(3, 0) instanceof NullValue);
    d.rollBackTrans();
   }
 
  public void testValuesDuringEditionFakeTransaction() throws Exception {
View Full Code Here

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

    d.beginTrans();
    d.insertEmptyRow();
        d.setFieldValue(3, 0, ValueFactory.createValue(5));
    d.commitTrans();

    d = ds.getDataSource(dsName);
    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.