Package com.orientechnologies.orient.core.db.document

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.drop()


    System.out.println("Reopen it...");
    // Something was added to dbPath so the legacy situation was simulated
    dbPath += "/foo";
    db = new ODatabaseDocumentTx("plocal:" + dbPath).open("admin", "admin");
    db.drop();
  }

  public void withNormalPath() {
    String dbPath = getDatabasePath();
View Full Code Here


    db.create();
    db.close();

    System.out.println("Reopen it...");
    db = new ODatabaseDocumentTx("plocal:" + dbPath).open("admin", "admin");
    db.drop();
  }

  public void dbOperations() {
    String dbPath = getDatabasePath();
View Full Code Here

    System.out.println("Create OK!");
    db = new ODatabaseDocumentTx("plocal:" + dbPath).open("admin", "admin");
    System.out.println("Open OK!");
    Assert.assertTrue(db.exists());
    System.out.println("Exists OK!");
    db.drop();
    System.out.println("Delete OK!");
  }

  public void contextConfigurationOnCreation() {
    ODatabaseDocumentTx db = new ODatabaseDocumentTx("memory:testCtxCfgOnCreate");
View Full Code Here

      assertNotNull(result);
      assertEquals(result.size(), 1 );
      assertNotNull(result.get(0).field("uuid"));

    } finally {
      db.drop();
    }
  }

}
View Full Code Here

    final ODocument loadDocument = databaseDocumentTx.load(storeDocument.getIdentity());
    final OSimpleKeyIndexDefinition loadedKeyIndexDefinition = new OSimpleKeyIndexDefinition();
    loadedKeyIndexDefinition.fromStream(loadDocument);

    databaseDocumentTx.drop();

    Assert.assertEquals(loadedKeyIndexDefinition, simpleKeyIndexDefinition);
  }

  @Test(expectedExceptions = OIndexException.class)
View Full Code Here

    final ODocument docToLoad = database.load(docToStore.getIdentity());

    final OCompositeIndexDefinition result = new OCompositeIndexDefinition();
    result.fromStream(docToLoad);

    database.drop();
    Assert.assertEquals(result, emptyCompositeIndex);
  }

  @Test
  public void testIndexReload() {
View Full Code Here

    final ODocument docToLoad = database.load(docToStore.getIdentity());

    final OCompositeIndexDefinition result = new OCompositeIndexDefinition();
    result.fromStream(docToLoad);

    database.drop();
    Assert.assertEquals(result, emptyCompositeIndexTwo);
  }

  public void testProcessChangeListEventsOne() {
    final OCompositeIndexDefinition compositeIndexDefinition = new OCompositeIndexDefinition();
View Full Code Here

  public void testConcurrency() throws Exception {
    ODatabaseDocumentTx db = new ODatabaseDocumentTx(URL);
    if (db.exists()) {
      db.open("admin", "admin");
      db.drop();
    }

    db.create();
    db.declareIntent(new OIntentMassiveInsert());
View Full Code Here

      iterator.next();

    long end = System.nanoTime();
    System.out.println(end - start);

    db.drop();
  }
}
View Full Code Here

  public void setUpClass() {
    final ODatabaseDocumentTx setup = new ODatabaseDocumentTx(url);

    if (setup.exists()) {
      setup.open("admin", "admin");
      setup.drop();
      setup.create();
    } else {
      setup.create();
    }
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.