public List<Map<String, Object>> query(Collection collection,
String fromKey, String toKey, int limit) {
log("query", fromKey, toKey, limit);
DBCollection dbCollection = getDBCollection(collection);
QueryBuilder queryBuilder = QueryBuilder.start(UpdateOp.ID);
queryBuilder.greaterThanEquals(fromKey);
queryBuilder.lessThan(toKey);
DBObject query = queryBuilder.get();
long start = start();
try {
DBCursor cursor = dbCollection.find(query);