Package jp.ameba.mongo.protocol

Examples of jp.ameba.mongo.protocol.Query


  }

  @Override
  public long count(BSONObject selector) {
    Response response = client.getConnection().query(
        new Query(databaseName, "$cmd", 0, 1, new BasicBSONObject()
          .append("count", collectionName)
          .append("query", selector)
        ));
    BSONObject obj = response.getDocument();
    long count = ((Number) obj.get("n")).longValue();
View Full Code Here


  }
 
  @Override
  public void drop() {
    client.getConnection().query(
        new Query(
            databaseName,
            "$cmd",
            0, 1,
            new BasicBSONObject("drop", collectionName)
        )
View Full Code Here

          special.put("$query", selector);
          queryObject = special;
        } else {
          queryObject = selector;
        }
        query = new Query(databaseName, collectionName, firstSkip, batchSize, queryObject, fields);
      }
      lastResult= conn.query(query);
      // 最終結果がなければ、次はない
      if (lastResult.getNumberReturned() == 0) {
        finished = true;
View Full Code Here

TOP

Related Classes of jp.ameba.mongo.protocol.Query

Copyright © 2018 www.massapicom. 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.