Examples of runQuery()


Examples of com.j256.ormlite.support.CompiledStatement.runQuery()

      throws SQLException {
    DatabaseConnection conn = connectionSource.getReadOnlyConnection();
    CompiledStatement stmt = null;
    try {
      stmt = preparedQuery.compile(conn);
      DatabaseResults results = stmt.runQuery();
      int fooC = 0;
      while (results.next()) {
        LocalFoo foo2 = preparedQuery.mapRow(results);
        assertEquals(foos.get(fooC).id, foo2.id);
        fooC++;
View Full Code Here

Examples of com.j256.ormlite.support.CompiledStatement.runQuery()

    assertEquals(1, dao.create(foo));
    DatabaseConnection conn = connectionSource.getReadOnlyConnection();
    CompiledStatement stmt = null;
    try {
      stmt = conn.compileStatement("select * from " + TABLE_NAME, StatementType.SELECT, noFieldTypes);
      DatabaseResults results = stmt.runQuery();
      assertTrue(results.next());
      int colNum = results.findColumn(STRING_COLUMN);
      DataType.JAVA_DATE_STRING.getDataPersister().resultToJava(null, results, colNum);
    } finally {
      if (stmt != null) {
View Full Code Here

Examples of com.j256.ormlite.support.CompiledStatement.runQuery()

      if (queryAfter != null) {
        expect(conn.compileStatement(isA(String.class), isA(StatementType.class), isA(FieldType[].class))).andReturn(
            stmt);
        results = createMock(DatabaseResults.class);
        expect(results.next()).andReturn(false);
        expect(stmt.runQuery()).andReturn(results);
        stmt.close();
        replay(results);
        rowC.incrementAndGet();
      }
    }
View Full Code Here

Examples of com.saxonica.codegen.QueryCompiler.runQuery()

                        outputFile = outputDir + "/" + testName + ".out";
                        File outputFileF = new File(outputFile);
                        outputFileF.createNewFile();
                        StreamResult result = new StreamResult(outputFileF);
                        try {
                            qc.runQuery(dqc, result, outputProps);
                        } catch (XPathException err) {
                            if (!err.hasBeenReported()) {
                                log.println(err.getMessage());
                            }
                            processError(err, testCase, testName, filePath + queryName + ".xq", expectedErrorNT, specVersionAtt);
View Full Code Here

Examples of edu.gmu.seor.prognos.reasoning.server.MEBNReasoningWS.runQuery()

         
          milliseconds = System.currentTimeMillis();
         
          MEBNReasoningWSService servico = new MEBNReasoningWSService();
        MEBNReasoningWS port = servico.getMEBNReasoningWSPort();
        List<QueryResultSummary> ret = port.runQuery(query);
        // TODO also, change this portion for multiple query result
        if (ret != null && !ret.isEmpty()) {
          queryResult = ret.get(0);
        }
           
View Full Code Here

Examples of ivory.smrf.retrieval.QueryRunner.runQuery()

    }

    for (String qid : mQueries.keySet()) {
      String rawQueryText = mQueries.get(qid);
      sLogger.info("query id:" + qid + ", query text:" + rawQueryText);
      runner.runQuery(qid, rawQueryText.split("\\s+"));
    }

    // where should we output these results?
    ResultWriter resultWriter = null;
    resultWriter = getResultWriter(mOutputFile, false);
View Full Code Here

Examples of org.apache.accumulo.examples.wikisearch.logic.ContentLogic.runQuery()

    if (auths != null && auths.length() > 0)
      for (String a : auths.split(","))
        authorizations.add(a);
    ContentLogic table = new ContentLogic();
    table.setTableName(tableName);
    return table.runQuery(connector, query, authorizations);
   
  }
 
  /**
   * calls the query logic with the parameters, returns results
View Full Code Here

Examples of org.apache.accumulo.examples.wikisearch.logic.QueryLogic.runQuery()

    table.setIndexTableName(tableName + "Index");
    table.setReverseIndexTableName(tableName + "ReverseIndex");
    table.setQueryThreads(threads);
    table.setUnevaluatedFields("TEXT");
    table.setUseReadAheadIterator(false);
    return table.runQuery(connector, authorizations, query, null, null, null);
  }
 
}
View Full Code Here

Examples of org.apache.drill.exec.client.DrillClient.runQuery()

    try(DrillClient client = new DrillClient(config);){
      client.connect();
      RecordBatchLoader batchLoader = new RecordBatchLoader(client.getAllocator());
      ParquetResultListener resultListener = new ParquetResultListener(recordsPerRowGroup, batchLoader, numberOfRowGroups, numberOfTimesRead);
      client.runQuery(UserProtos.QueryType.PHYSICAL, Files.toString(FileUtils.getResourceAsFile(plan), Charsets.UTF_8), resultListener);
      resultListener.get();
    }
   
  }
 
View Full Code Here

Examples of org.apache.drill.exec.client.DrillClient.runQuery()

      bit1.run();
      client.connect();
      RecordBatchLoader batchLoader = new RecordBatchLoader(client.getAllocator());
      ParquetResultListener resultListener = new ParquetResultListener(recordsPerRowGroup, batchLoader, numberOfRowGroups, numberOfTimesRead);
      Stopwatch watch = new Stopwatch().start();
      client.runQuery(UserProtos.QueryType.LOGICAL, planText, resultListener);
      resultListener.get();
      System.out.println(String.format("Took %d ms to run query", watch.elapsed(TimeUnit.MILLISECONDS)));

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