@goatlab/fluent-firebase 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Firebase.d.ts +0 -0
- package/dist/Firebase.js +0 -0
- package/dist/FirebaseConnector.d.ts +1 -1
- package/dist/FirebaseConnector.js +7 -4
- package/dist/FirebaseInit.d.ts +0 -0
- package/dist/FirebaseInit.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/test/car.repository.d.ts +0 -0
- package/dist/test/car.repository.js +0 -0
- package/dist/test/goat.repository.d.ts +0 -0
- package/dist/test/goat.repository.js +0 -0
- package/dist/test/roles.repository.d.ts +0 -0
- package/dist/test/roles.repository.js +0 -0
- package/dist/test/roles_user.repository.d.ts +0 -0
- package/dist/test/roles_user.repository.js +0 -0
- package/dist/test/typeOrm.repository.d.ts +0 -0
- package/dist/test/typeOrm.repository.js +0 -0
- package/dist/test/user.repository.d.ts +0 -0
- package/dist/test/user.repository.js +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/Firebase.d.ts
CHANGED
|
File without changes
|
package/dist/Firebase.js
CHANGED
|
File without changes
|
|
@@ -21,7 +21,7 @@ export declare class FirebaseConnector<ModelDTO = AnyObject, InputDTO = ModelDTO
|
|
|
21
21
|
rawFirebase(): admin.firestore.Firestore;
|
|
22
22
|
protected loadRelatedData(data: any[], loadedKeys: AnyObject): Promise<admin.firestore.DocumentData[]>;
|
|
23
23
|
findMany<T extends FluentQuery<ModelDTO>>(query?: T): Promise<QueryOutput<T, ModelDTO, OutputDTO>>;
|
|
24
|
-
loadFirst(query?: FluentQuery<ModelDTO>):
|
|
24
|
+
loadFirst(query?: FluentQuery<ModelDTO>): LoadedResult<this>;
|
|
25
25
|
private getGeneratedQueries;
|
|
26
26
|
private getFirebaseWhereQuery;
|
|
27
27
|
updateById(id: string, data: InputDTO): Promise<OutputDTO>;
|
|
@@ -122,13 +122,16 @@ class FirebaseConnector extends fluent_2.BaseConnector {
|
|
|
122
122
|
return this.outputSchema?.array().parse(found);
|
|
123
123
|
}
|
|
124
124
|
loadFirst(query) {
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
const newInstance = this.clone();
|
|
126
|
+
newInstance.setRelatedQuery({
|
|
127
127
|
entity: this.entity,
|
|
128
128
|
repository: this,
|
|
129
|
-
query
|
|
129
|
+
query: {
|
|
130
|
+
...query,
|
|
131
|
+
limit: 1
|
|
132
|
+
}
|
|
130
133
|
});
|
|
131
|
-
return
|
|
134
|
+
return newInstance;
|
|
132
135
|
}
|
|
133
136
|
getGeneratedQueries(query) {
|
|
134
137
|
let { andWhere, orWhere } = this.getFirebaseWhereQuery(query?.where);
|
package/dist/FirebaseInit.d.ts
CHANGED
|
File without changes
|
package/dist/FirebaseInit.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|