You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
576 B

module.exports = class MockQuery {
constructor() {
this._score_functions = [];
this._sort_functions = [];
this._filter_functions = [];
}
render(vs) {
return {
vs: vs,
score_functions: this._score_functions,
sort_functions: this._sort_functions,
filter_functions: this._filter_functions
};
}
score(view) {
this._score_functions.push(view);
return this;
}
sort(view) {
this._sort_functions.push(view);
return this;
}
filter(view) {
this._filter_functions.push(view);
return this;
}
};