grapher/lib/query/extension.js

14 lines
333 B
JavaScript
Raw Normal View History

2016-09-14 16:04:08 +03:00
import Query from './query.js';
_.extend(Mongo.Collection.prototype, {
createQuery(body, params = {}) {
return new Query(this, body, params);
2016-09-15 09:14:15 +03:00
},
createQueryFactory(body, params) {
const collection = this;
return () => {
return new Query(collection, body, params);
}
2016-09-14 16:04:08 +03:00
}
});