Examples of Query


Examples of com.github.seratch.scalikesolr.request.query.Query

        client = Solr.httpServer(new URL("http://localhost:8983/solr")).getNewClient();
    }

    @Test
    public void doQuery() throws Exception {
        QueryRequest request = new QueryRequest(new Query("author:Rick"));
        QueryResponse response = client.doQuery(request);
        assertThat(response.getResponseHeader(), is(notNullValue()));
        assertThat(response.getResponse(), is(notNullValue()));
        assertThat(response.getHighlightings(), is(notNullValue()));
        assertThat(response.getMoreLikeThis(), is(notNullValue()));
View Full Code Here

Examples of com.github.youtube.vitess.jdbc.vtocc.QueryService.Query

   * Called by Acolyte when it's time to do a query.
   */
  @Override
  public QueryResult whenSQLQuery(String sql, List<Parameter> parameters) throws SQLException {
    try {
      Query query = vtoccQueryFactory.create(sql, parameters);
      // TODO(timofeyb): provide rpc controller
      QueryService.QueryResult response = sqlQueryBlockingInterface
          .execute(rpcControllerProvider.get(), query);
      return acolyteRowListFactory.create(response).asResult();
    } catch (ServiceException e) {
View Full Code Here

Examples of com.google.appengine.api.datastore.Query

  @Override
  public void removeByFile(final Long fileId) {
    if (fileId == null) {
      return;
    }
    Query q = newQuery();
    q.addFilter("fileId", EQUAL, fileId);
    removeSelected(q);
  }
View Full Code Here

Examples of com.google.appengine.api.search.Query

        }

        listResult = new ArrayList<News>();
        QueryOptions options = QueryOptions.newBuilder()
            .setNumberFoundAccuracy(1000).build();
        Query query = Query.newBuilder().setOptions(options)
            .build(queryString.toString());
        Results<ScoredDocument> docResult = INDEX.search(query);
        totalResult = (int) docResult.getNumberFound();

        SortOptions sortOptions = SortOptions
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.Query

    } else if ("datastore_v3".equals(service) && "Delete".equals(method)) {
      DeleteRequest requestPb = new DeleteRequest();
      requestPb.mergeFrom(request);
      return pre_datastore_v3_Delete(requestPb);
    } else if ("datastore_v3".equals(service) && "RunQuery".equals(method)) {
      Query requestPb = new Query();
      requestPb.mergeFrom(request);
      return pre_datastore_v3_RunQuery(requestPb);
    } else if ("datastore_v3".equals(service) && "Next".equals(method)) {
      NextRequest requestPb = new NextRequest();
      requestPb.mergeFrom(request);
      return pre_datastore_v3_Next(requestPb);
    } else if ("datastore_v3".equals(service) && "Commit".equals(method)) {
      Transaction requestPb = new Transaction();
      requestPb.mergeFrom(request);
      return pre_datastore_v3_Commit(requestPb);
    } else if ("datastore_v3".equals(service) && "Rollback".equals(method)) {
      Transaction requestPb = new Transaction();
      requestPb.mergeFrom(request);
      return pre_datastore_v3_Rollback(requestPb);
    } else if ("memcache".equals(service) && "Set".equals(method)) {
      try {
        MemcacheSetRequest requestPb = MemcacheSetRequest.parseFrom(request);
        return pre_memcache_Set(requestPb);
View Full Code Here

Examples of com.google.code.morphia.query.Query

      }
    }

    List<TorrentStats> torrentStatsList = new ArrayList<TorrentStats>();
    for (byte[] infoHash : infoHashes) {
      Query seedersQuery = Datastore.instance().createQuery(Peer.class);
      seedersQuery.field("infoHash").equal(infoHash);
      seedersQuery.field("left").equal(0);

      Query leechersQuery = Datastore.instance().createQuery(Peer.class);
      leechersQuery.field("infoHash").equal(infoHash);
      leechersQuery.field("left").greaterThan(0);

      TorrentStats torrentStats = new TorrentStats();
      torrentStats.infoHash = infoHash;
      torrentStats.seeders = (int)seedersQuery.countAll();
      torrentStats.completed = 0; // TODO: Для этого поля нам понадобится вести статистику загрузок.
      torrentStats.leechers = (int)leechersQuery.countAll();

      torrentStatsList.add(torrentStats);
    }

    ScrapeResponse.send(this.getMessageEvent(), this.getTransactionId(), torrentStatsList);
View Full Code Here

Examples of com.google.enterprise.connector.adgroups.AdDbUtil.Query

    LOGGER.log(Level.INFO, "Received authN request for Username [ "
        + username + " ], domain [ " + domain + " ]. ");

    HashMap<String, Object> sqlIdentity = new HashMap<String, Object>();
    sqlIdentity.put(AdConstants.DB_SAMACCOUNTNAME, username.toLowerCase());
    Query query;
    if (Strings.isNullOrEmpty(domain)) {
      query = Query.SELECT_USER_BY_SAMACCOUNTNAME;
    } else {
      //TODO: rename the DB bound variable to domain
      sqlIdentity.put(AdConstants.DB_NETBIOSNAME, domain);
View Full Code Here

Examples of com.google.gdata.client.Query

  private CalendarEventEntry findEntryForProgram(GoogleService myService, URL postUrl, String title, Program program) throws IOException, ServiceException {
    Calendar c = CalendarToolbox.getStartAsCalendar(program);
    DateTime startTime = new DateTime(c.getTime(), c.getTimeZone());

    Query myQuery = new Query(postUrl);
    myQuery.setFullTextQuery(title);
    CalendarEventFeed myResultsFeed = myService.query(myQuery, CalendarEventFeed.class);

    for (CalendarEventEntry entry : myResultsFeed.getEntries()) {
      if ((entry.getTimes().size() > 0) && (entry.getTimes().get(0).getStartTime().getValue() == startTime.getValue())) {
        return entry;
View Full Code Here

Examples of com.google.gwt.visualization.client.Query

  private Panel panel = new VerticalPanel();

  public TableDemo() {
    // Read data from spreadsheet
    String dataUrl = "http://spreadsheets.google.com/tq?key=prll1aQH05yQqp_DKPP9TNg&pub=1";
    Query query = Query.create(dataUrl);
    query.send(new Callback() {

      public void onResponse(QueryResponse response) {
        if (response.isError()) {
          Window.alert("Error in query: " + response.getMessage() + ' '
              + response.getDetailedMessage());
View Full Code Here

Examples of com.google.visualization.datasource.query.Query

  public void tearDown() throws Exception {
    super.tearDown();
  }

  public void testSelect() throws Exception {
    Query query = QueryBuilder.getInstance().parseQuery("SeLeCt  c1,c2  , c3 ");

    assertEquals(null, query.getSort());
    QuerySelection selection = query.getSelection();
    assertEquals(Lists.newArrayList(new SimpleColumn("c1"),
        new SimpleColumn("c2"), new SimpleColumn("c3")),
        selection.getColumns());
  }
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.