@firestore-repository/google-cloud-firestore 0.3.0 → 0.4.0
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/README.md +1 -1
- package/build/esm/index.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -93,7 +93,7 @@ await repository.delete({ userId: 'user2' });
|
|
93
93
|
import { condition as $, limit, query, where } from 'firestore-repository/query';
|
94
94
|
|
95
95
|
// Define a query
|
96
|
-
const query1 = query(users,
|
96
|
+
const query1 = query(users, $('profile.age', '>=', 20), limit(10));
|
97
97
|
|
98
98
|
// List documents
|
99
99
|
const docs = await repository.list(query1);
|
package/build/esm/index.js
CHANGED
@@ -167,7 +167,9 @@ export const toFirestoreQuery = (db, query) => {
|
|
167
167
|
return (query.constraints?.reduce((q, constraint) => {
|
168
168
|
switch (constraint.kind) {
|
169
169
|
case 'where':
|
170
|
-
|
170
|
+
case 'or':
|
171
|
+
case 'and':
|
172
|
+
return q.where(toFirestoreFilter(constraint));
|
171
173
|
case 'orderBy':
|
172
174
|
return q.orderBy(constraint.field, constraint.direction);
|
173
175
|
case 'limit':
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@firestore-repository/google-cloud-firestore",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.4.0",
|
4
4
|
"description": "A minimum and universal Firestore ORM (Repository Pattern) for TypeScript",
|
5
5
|
"homepage": "https://github.com/ikenox/firestore-repository",
|
6
6
|
"repository": {
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"type": "module",
|
11
11
|
"dependencies": {
|
12
12
|
"@google-cloud/firestore": "^7.10.0",
|
13
|
-
"firestore-repository": "0.
|
13
|
+
"firestore-repository": "0.4.0"
|
14
14
|
},
|
15
15
|
"exports": {
|
16
16
|
".": {
|