Page MenuHomeSealhub

matches.ts
No OneTemporary

matches.ts

import { SpecialFilter, Query } from "../../../main";
import QueryStage from "../../../datastore/query-stage";
export default class Matches extends SpecialFilter {
constructor(
collection_name: string,
public filter: { [field_name: string]: any }
) {
super(collection_name, filter);
}
async getFilteringQuery() {
let pipeline: QueryStage[] = [];
for (let field_name in this.filter) {
const field_pipeline = await this.getCollection().fields[
field_name
].getAggregationStages(
new this.app.SuperContext(),
this.filter[field_name]
);
pipeline = pipeline.concat(field_pipeline);
}
return Query.fromCustomPipeline(pipeline);
}
getNopassReason() {
return this.params.nopass_reason;
}
}

File Metadata

Mime Type
text/x-java
Expires
Tue, May 27, 23:47 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
631645
Default Alt Text
matches.ts (732 B)

Event Timeline