Examples of countClass()


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

  @Test
  public void deleteInPool() {
    ODatabaseDocumentTx db = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    final Long total = db.countClass("Profile");

    final List<ODocument> resultset = db.query(new OSQLSynchQuery<Object>(
        "select from Profile where sex = 'male' and salary > 120 and salary <= 133"));

    final Number records = (Number) db.command(
View Full Code Here

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

    final Number records = (Number) db.command(
        new OCommandSQL("delete from Profile where sex = 'male' and salary > 120 and salary <= 133")).execute();

    Assert.assertEquals(records.intValue(), resultset.size());

    Assert.assertEquals(db.countClass("Profile"), total - records.intValue());

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

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

      linkName = sourceField;

    boolean inverse = linkType != null && linkType.equalsIgnoreCase("inverse");
    boolean multipleRelationship = false;

    long totRecords = db.countClass(sourceClass.getName());
    long currRecord = 0;

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);
View Full Code Here

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

  @Test
  public void setup() throws IOException {
    ODatabaseDocumentTx database = new ODatabaseDocumentTx(url);
    database.open("admin", "admin");

    long tot = database.countClass("Account");

    // DELETE ALL THE Account OBJECTS
    int i = 0;
    for (ODocument rec : database.browseClass("Account")) {
      rec.delete();
View Full Code Here

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

      rec.delete();
      i++;
    }

    Assert.assertEquals(i, tot);
    Assert.assertEquals(database.countClass("Account"), 0);

    database.close();
  }

  @Test(dependsOnMethods = "setup")
View Full Code Here

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

      linkName = sourceField;

    boolean inverse = linkType != null && linkType.equalsIgnoreCase("inverse");
    boolean multipleRelationship = false;

    long totRecords = db.countClass(sourceClass.getName());
    long currRecord = 0;

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);
View Full Code Here

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

      linkName = sourceField;

    boolean inverse = linkType != null && linkType.equalsIgnoreCase("inverse");
    boolean multipleRelationship = false;

    long totRecords = db.countClass(sourceClass.getName());
    long currRecord = 0;

    if (progressListener != null)
      progressListener.onBegin(this, totRecords);
View Full Code Here

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

      // DETERMINE BASED ON FORCED TYPE
      multipleRelationship = linkType == OType.LINKSET || linkType == OType.LINKLIST;
    else
      multipleRelationship = false;

    long totRecords = db.countClass(sourceClass.getName());
    long currRecord = 0;

    if (progressListener != null)
      progressListener.onBegin(this, totRecords, false);
View Full Code Here

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

      @Override
      public Void call() throws Exception {
        final ODatabaseDocumentTx db = new ODatabaseDocumentTx(database.getURL());
        db.open("admin", "admin");
        try {
          Assert.assertEquals(db.countClass("NestedTxClass"), 0);
        } finally {
          db.close();
        }

        return null;
View Full Code Here

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

      @Override
      public Void call() throws Exception {
        final ODatabaseDocumentTx db = new ODatabaseDocumentTx(database.getURL());
        db.open("admin", "admin");
        try {
          Assert.assertEquals(db.countClass("NestedTxRollbackOne"), 1);
        } finally {
          db.close();
        }

        return null;
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.