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

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


    final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/demo");
    for (int i = 0; i < 1000; ++i) {
      System.out.println("Connecting " + i + "...");
      db.open("admin", "admin");
      db.query(new OSQLSynchQuery<Object>("select 1"));
//      try {
//        Thread.sleep(100);
//      } catch (InterruptedException e) {
//        e.printStackTrace();
//      }
View Full Code Here


  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(
        new OCommandSQL("delete from Profile where sex = 'male' and salary > 120 and salary <= 133")).execute();
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.