vertx-mongo-client
vertx-mongo-client copied to clipboard
[3.6.2] MongoClientImpl findBatch does not transmit 'batchSize' param to FindIterable
I changed to code to this MongoClientImpl
private FindIterable<JsonObject> doFind(String collection, JsonObject query, FindOptions options) {
MongoCollection<JsonObject> coll = getCollection(collection);
Bson bquery = wrap(encodeKeyWhenUseObjectId(query));
FindIterable<JsonObject> find = coll.find(bquery, JsonObject.class);
if (options.getBatchSize() > 0) {
find.batchSize(options.getBatchSize());
}
if (options.getLimit() != -1) {
find.limit(options.getLimit());
}
if (options.getSkip() > 0) {
find.skip(options.getSkip());
}
if (options.getSort() != null) {
find.sort(wrap(options.getSort()));
}
if (options.getFields() != null) {
find.projection(wrap(options.getFields()));
}
return find;
}
Can you submit a proper PR for this?