mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-20 07:44:39 +08:00
[js][database] fixed an issue where query methods were not returning correctly
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user