@nxtedition/lib 19.0.50 → 19.0.51
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/deepstream.js +8 -11
- package/package.json +1 -1
package/deepstream.js
CHANGED
|
@@ -138,12 +138,12 @@ function getRecord(ds, name, ...args) {
|
|
|
138
138
|
)
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
function query(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
function query(ds, designId, params, state = ds.record.PROVIDER) {
|
|
142
|
+
if (params.key) {
|
|
143
|
+
// TODO (fix): params.key?
|
|
144
|
+
throw new Error('params.key is not supported')
|
|
145
|
+
}
|
|
146
|
+
|
|
147
147
|
const next = (startkey, prevRows, limit) =>
|
|
148
148
|
Number.isFinite(limit) && limit <= 0
|
|
149
149
|
? rxjs.of({ rows: prevRows })
|
|
@@ -151,11 +151,8 @@ function query(
|
|
|
151
151
|
.observe(
|
|
152
152
|
`${designId}:design?${qs.stringify(
|
|
153
153
|
{
|
|
154
|
+
...params,
|
|
154
155
|
startkey,
|
|
155
|
-
endkey,
|
|
156
|
-
key,
|
|
157
|
-
sorted,
|
|
158
|
-
descending,
|
|
159
156
|
limit: Number.isFinite(limit) ? limit : null,
|
|
160
157
|
},
|
|
161
158
|
{ skipNulls: true },
|
|
@@ -179,7 +176,7 @@ function query(
|
|
|
179
176
|
}
|
|
180
177
|
}),
|
|
181
178
|
)
|
|
182
|
-
return next(startkey, [], limit ?? Infinity)
|
|
179
|
+
return next(params.startkey, [], params.limit ?? Infinity)
|
|
183
180
|
}
|
|
184
181
|
|
|
185
182
|
export function makeDeepstream(ds) {
|