Package com.orientechnologies.orient.core.db.record

Examples of com.orientechnologies.orient.core.db.record.ODatabaseFlat.begin()


    ODatabaseFlat db1 = new ODatabaseFlat(url);
    db1.open("admin", "admin");

    long rec = db1.countClusterElements("binary");

    db1.begin();

    ORecordFlat record1 = new ORecordFlat(db1);
    record1.value("This is the first version").save();

    db1.rollback();
View Full Code Here


    ODatabaseFlat db1 = new ODatabaseFlat(url);
    db1.open("admin", "admin");

    long tot = db1.countClusterElements("binary");

    db1.begin();

    ORecordFlat record1 = new ORecordFlat(db1);
    record1.value("This is the first version").save("binary");

    db1.commit();
View Full Code Here

    ORecordFlat record = new ORecordFlat(db);
    record.value("This is the first version").save();

    try {
      db.begin();

      // RE-READ THE RECORD
      record.load();
      int v1 = record.getVersion();
      record.value("This is the second version").save();
View Full Code Here

    ODatabaseFlat db1 = new ODatabaseFlat(url);
    db1.open("admin", "admin");

    long rec = db1.countClusterElements("binary");

    db1.begin();

    ORecordFlat record1 = new ORecordFlat(db1);
    record1.value("This is the first version").save();

    db1.rollback();
View Full Code Here

    ODatabaseFlat db1 = new ODatabaseFlat(url);
    db1.open("admin", "admin");

    long tot = db1.countClusterElements("binary");

    db1.begin();

    ORecordFlat record1 = new ORecordFlat(db1);
    record1.value("This is the first version").save("binary");

    db1.commit();
View Full Code Here

    ORecordFlat record = new ORecordFlat(db);
    record.value("This is the first version").save();

    try {
      db.begin();

      // RE-READ THE RECORD
      record.load();
      int v1 = record.getVersion();
      record.value("This is the second version").save();
View Full Code Here

  @Test(dependsOnMethods = "testDictionaryMassiveCreate")
  public void testDictionaryInTx() throws IOException {
    ODatabaseFlat database = new ODatabaseFlat(url);
    database.open("admin", "admin");

    database.begin();
    database.getDictionary().put("tx-key", database.newInstance().value("tx-test-dictionary"));
    database.commit();

    Assert.assertNotNull(database.getDictionary().get("tx-key"));
View Full Code Here

      public boolean onCorruptionRepairDatabase(ODatabase iDatabase, final String iReason, String iWhatWillbeFixed) {
        return true;
      }
    });

    db.begin();
    db.commit();

    db.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.