Examples of Query


Examples of org.infinispan.query.dsl.Query

      remoteCache.put(1, createUser(1));
      remoteCache.put(2, createUser(2));

      // get user back from remote cache via query and check its attributes
      QueryFactory qf = Search.getQueryFactory(remoteCache);
      Query query = qf.from(User.class)
            .having("addresses.postCode").eq("1231").toBuilder()
            .build();
      List<User> list = query.list();
      assertNotNull(list);
      assertEquals(1, list.size());
      assertEquals(User.class, list.get(0).getClass());
      assertEquals("Tom1", list.get(0).getName());
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Query

     *
     * @return the resulting query command; never null
     * @see #clear()
     */
    public QueryCommand query() {
        QueryCommand result = new Query(source, constraint, orderings, columns, limit, distinct);
        if (this.firstQuery != null) {
            // EXCEPT has a higher precedence than INTERSECT or UNION, so if the first query is
            // an INTERSECT or UNION SetQuery, the result should be applied to the RHS of the previous set ...
            if (firstQuery instanceof SetQuery && firstQuerySetOperation == Operation.EXCEPT) {
                SetQuery setQuery = (SetQuery)firstQuery;
View Full Code Here

Examples of org.jmxtrans.embedded.Query

    }

    @Test
    public void validateBasicQuery() throws MalformedObjectNameException {
        ObjectName objectName = new ObjectName("java.lang:type=MemoryPool,name=PS Eden Space");
        Query query = queriesByResultName.get(objectName.toString());
        assertThat(query.getObjectName(), is(objectName));
        assertThat(query.getResultAlias(), nullValue());
        assertThat(query.getQueryAttributes().size(), is(1));
        QueryAttribute queryAttribute = query.getQueryAttributes().iterator().next();
        assertThat(queryAttribute.getName(), is("CollectionUsageThreshold"));
    }
View Full Code Here

Examples of org.jongo.query.Query

    @Test
    public void canCreateQuery() throws Exception {

        Jongo jongo = new Jongo(getDatabase());

        Query query = jongo.createQuery("{test:1}");

        assertThat(query.toDBObject().get("test")).isEqualTo(1);
    }
View Full Code Here

Examples of org.jooq.Query

    @Test
    public void testBatchMultiple() {
        DSLContext e = DSL.using(new MockConnection(new BatchMultiple()), SQLDialect.H2);

        Query query = e.query("insert into x values(?, ?)", null, null);

        int[] result =
        e.batch(query)
         .bind(1, 2)
         .bind(3, 4)
View Full Code Here

Examples of org.josql.Query

    pointers.add(fresh);
    return fresh;
  }
 
  private QueryResults select(String whereClause) throws QueryParseException, QueryExecutionException {
    Query q = new Query ();
    q.parse ("SELECT * FROM " + Pointer.class.getCanonicalName() + "  WHERE " + whereClause);
    QueryResults qr = q.execute (pointers);
    return qr;
  }
View Full Code Here

Examples of org.jrdf.query.Query

    }

    public Answer executeQuery(Graph graph, String queryText) throws InvalidQuerySyntaxException, GraphException {
        checkNotNull(graph, queryText);
        checkNotEmptyString("queryText", queryText);
        Query query = builder.buildQuery(graph, queryText);
        if (graph.isEmpty()) {
            return getEmptyAnswer(query);
        }
        return query.executeQuery(graph, queryEngine);
    }
View Full Code Here

Examples of org.jruby.pg.internal.messages.Query

    sendDescribeCommon(message);
  }

  public void sendQuery(PostgresqlString query) throws IOException {
    checkIsReady();
    currentOutBuffer = new Query(query).toBytes();
    state = ConnectionState.SendingQuery;
    if (!nonBlocking)
      socket.configureBlocking(true);
    socket.write(currentOutBuffer);
    if (!nonBlocking)
View Full Code Here

Examples of org.jugile.util.Query

    return res;
  }
 
  private Query q = null;
  public Query q() {
    if (q == null) q = new Query();
    return q;
  }
View Full Code Here

Examples of org.jwall.rbl.dns.Query

        socket.receive(packet);
        log.debug( "Received packet {}... size is {}", packet.getAddress() + ":" + packet.getPort(), packet.getLength() );
        byte[] data = packet.getData();
        log.debug( "Received packet of size {} bytes: {}", data.length, new String(data) );
       
        Query q = Query.parse( data, 0 );
        Response response = queryHandler.process( packet.getAddress(), q );

        byte[] re = response.toByteArray();
        DatagramPacket answer = new DatagramPacket( re, 0 );
        answer.setLength( re.length );
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.