Examples of OResultSet


Examples of com.orientechnologies.orient.core.sql.query.OResultSet

      {
        public void run()
        {
          try{
          DbHelper.open("1234567890", "admin", "admin");
          OResultSet result1=(OResultSet)DbHelper.genericSQLStatementExecute("select sysdate()",new String[]{});
          ODocument res1 = (ODocument)result1.get(0);
          String jsonString1= res1.toJSON();
          ObjectMapper om = new ObjectMapper();
          JsonNode json1 = om.readTree(jsonString1);
          String dateString1 = json1.get("sysdate").asText();
          String seconds1=dateString1.substring(17,19);
          String milliseconds1=dateString1.substring(20,23);
          Thread.sleep(1000);
          OResultSet result2=(OResultSet)DbHelper.genericSQLStatementExecute("select sysdate()",new String[]{});
          ODocument res2 = (ODocument)result2.get(0);
          String jsonString2= res2.toJSON();
          JsonNode json2 = om.readTree(jsonString2);
          String dateString2 = json2.get("sysdate").asText();
          String seconds2=dateString2.substring(17,19);
          String milliseconds2=dateString2.substring(20,23);
View Full Code Here

Examples of com.orientechnologies.orient.core.sql.query.OResultSet

  private boolean parseParallel(String w) {
    return w.equals(KEYWORD_PARALLEL);
  }

  private void parallelExec(final Iterator<? extends OIdentifiable> iTarget) {
    final OResultSet result = (OResultSet) getResult();

    // BROWSE ALL THE RECORDS ON CURRENT THREAD BUT DELEGATE UNMARSHALLING AND FILTER TO A THREAD POOL
    final ODatabaseRecordInternal db = getDatabase();

    if (limit > -1) {
      if (result != null)
        result.setLimit(limit);
    }

    final int cores = Runtime.getRuntime().availableProcessors();
    OLogManager.instance().debug(this, "Parallel query against %d threads", cores);
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.