grapher/lib/query/extension.js
2016-09-15 09:14:15 +03:00

14 lines
No EOL
333 B
JavaScript

import Query from './query.js';
_.extend(Mongo.Collection.prototype, {
createQuery(body, params = {}) {
return new Query(this, body, params);
},
createQueryFactory(body, params) {
const collection = this;
return () => {
return new Query(collection, body, params);
}
}
});