2
0
mirror of synced 2025-01-11 06:35:51 +00:00

[js][database] fixed an issue where query methods were not returning correctly

This commit is contained in:
Salakar 2017-08-05 21:45:15 +01:00
parent 78e9f4b7c7
commit d2909be7eb

View File

@ -11,8 +11,8 @@ export default class Query {
modifiers: Array<DatabaseModifier>;
constructor(ref: Reference, path: string, existingModifiers?: Array<DatabaseModifier>) {
ref.log.debug('creating Query ', path, existingModifiers);
this.modifiers = existingModifiers ? [...existingModifiers] : [];
this._reference = ref;
}
orderBy(name: string, key?: string) {
@ -21,6 +21,8 @@ export default class Query {
name,
key,
});
return this._reference;
}
limit(name: string, limit: number) {
@ -29,6 +31,8 @@ export default class Query {
name,
limit,
});
return this._reference;
}
filter(name: string, value: any, key?: string) {
@ -39,6 +43,8 @@ export default class Query {
valueType: typeof value,
key,
});
return this._reference;
}
getModifiers(): Array<DatabaseModifier> {