Examples of executeQuery()


Examples of oracle.toplink.sessions.Session.executeQuery()

            + "' acquired !");
      }

      // Data extraction using DatabaseQuery
      if (this.databaseQuery != null) {
        tplReturn = tplSession.executeQuery(this.databaseQuery);
      }
      // Data extraction using NamedQuery
      else if (this.namedQuery != null && !"".equals(this.namedQuery)) {
        // We check if NamedQuery use parameter
        if (!this.namedQueryUseParameters) {
View Full Code Here

Examples of org.adbcj.Connection.executeQuery()

      // Clear out updates table
      Result result = connection.executeUpdate("DELETE FROM updates").get();
      assertNotNull(result);

      // Make sure updates is empty
      ResultSet rs = connection.executeQuery("SELECT id FROM updates").get();
      assertNotNull(rs);
      assertEquals(rs.size(), 0);

      connection.beginTransaction();
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.executeQuery()

            batch.insert(rec);
        }
        batch.apply();

        // Query the records just added
        HResultSet<HRecord> records = conn.executeQuery("SELECT * FROM demo1");

        for (HRecord rec : records) {
            System.out.println("Key = " + rec.getCurrentValue("keyval"));
            System.out.println("f1:val1 = " + rec.getCurrentValue("val1"));
            System.out.println("f1:val2 = " + rec.getCurrentValue("f1:val2"));
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HPreparedStatement.executeQuery()

        HPreparedStatement pstmt = conn.prepareStatement("select * from alltypes2 WITH LIMIT :limit");

        pstmt.setParameter("limit", cnt / 2);

        HResultSet<AnnotatedAllTypes> recs = pstmt.executeQuery(AnnotatedAllTypes.class);

        int reccnt = 0;
        for (final AnnotatedAllTypes rec : recs)
            assertTrue(rec.equals(vals.get(reccnt++)));

View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.HStatement.executeQuery()

                              + "VERSIONS 3 "
                              //+ "SERVER FILTER WHERE author LIKE '.*val.*' OR LENGTH(author) > 4 "
                              + "CLIENT FILTER WHERE author LIKE '.*val.*' OR LENGTH(author) > 4";

        HStatement stmt = conn.createStatement();
        HResultSet<TestObject> results2 = stmt.executeQuery(query2, TestObject.class);

        for (TestObject val2 : results2) {
            System.out.println("Current Values: " + val2.keyval + " - " + val2.author + " - " + val2.title);

            System.out.println("Historicals");
View Full Code Here

Examples of org.apache.hadoop.hbase.hql.HQLClient.executeQuery()

      if (isEndOfCommand(extendedLine)) {
        queryStr.append(" " + extendedLine);
        long start = System.currentTimeMillis();

        HQLClient hql = new HQLClient(conf, MASTER_ADDRESS, out, tableFormater);
        ReturnMsg rs = hql.executeQuery(queryStr.toString());

        long end = System.currentTimeMillis();
        if (rs != null) {
          if (rs != null && rs.getType() > -1)
            System.out.println(rs.getMsg() +
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.QueryEngine.executeQuery()

        stmt.append(']');
        stmt.append(" order by jcr:path");

        try {
            QueryEngine queryEngine = root.getQueryEngine();
            return queryEngine.executeQuery(stmt.toString(), Query.XPATH, Long.MAX_VALUE, 0, Collections.<String, PropertyValue>emptyMap(), NamePathMapper.DEFAULT);
        } catch (ParseException e) {
            String msg = "Error while collecting effective policies.";
            log.error(msg, e.getMessage());
            throw new RepositoryException(msg, e);
        }
View Full Code Here

Examples of org.apache.metamodel.DataContext.executeQuery()

    // only select "bar" which is not converted
    Table table = converted.getDefaultSchema().getTableByName("table");
    Query query = converted.query().from(table).select("bar").toQuery();
    assertEquals("SELECT table.bar FROM schema.table", query.toSql());

    DataSet ds = converted.executeQuery(query);
    assertEquals(InMemoryDataSet.class, ds.getClass());

  }
}
View Full Code Here

Examples of org.apache.metamodel.MockUpdateableDataContext.executeQuery()

        assertEquals(1, converters.size());
        dc = Converters.addTypeConverters(dc, converters);

        final Query q = dc.query().from(table).select("foo").toQuery();
        assertEquals("SELECT table.foo FROM schema.table", q.toSql());
        DataSet ds = dc.executeQuery(q);
        assertTrue(ds.next());
        assertEquals(1, ds.getRow().getValue(0));
        assertTrue(ds.next());
        assertEquals(2, ds.getRow().getValue(0));
        assertTrue(ds.next());
View Full Code Here

Examples of org.apache.metamodel.QueryPostprocessDataContext.executeQuery()

        assertEquals("male", columns[2].getName());
        assertEquals("19", columns[3].getName());

        Query query = dc.query().from(table).select(table.getColumnByName("michael")).toQuery();

        DataSet dataSet = dc.executeQuery(query);
        assertTrue(dataSet.next());
        assertEquals("peter", dataSet.getRow().getValue(0));
        assertTrue(dataSet.next());
        assertEquals("bob", dataSet.getRow().getValue(0));
        assertTrue(dataSet.next());
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.