@nxtedition/lib 19.5.1 → 19.5.3
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 +5 -11
- package/package.json +1 -1
package/deepstream.js
CHANGED
|
@@ -161,19 +161,13 @@ function query(ds, designId, params, state = ds.record.PROVIDER) {
|
|
|
161
161
|
)
|
|
162
162
|
.pipe(
|
|
163
163
|
rxjs.filter(({ rows }) => Array.isArray(rows)),
|
|
164
|
-
rxjs.switchMap(({ rows, finished }) => {
|
|
164
|
+
rxjs.switchMap(({ rows: currRows, finished }) => {
|
|
165
165
|
// assert(Array.isArray(rows))
|
|
166
166
|
// assert(typeof finished === 'boolean')
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
} else {
|
|
172
|
-
const last = rows.pop()
|
|
173
|
-
// assert(last.key)
|
|
174
|
-
// assert(rows.length > 0)
|
|
175
|
-
return next(last.key, nextRows, limit - rows.length)
|
|
176
|
-
}
|
|
167
|
+
const rows = prevRows.length ? [...prevRows, ...currRows] : currRows
|
|
168
|
+
return finished
|
|
169
|
+
? rxjs.of({ rows })
|
|
170
|
+
: next(currRows.at(-1).key + '\u0000', rows, limit - currRows.length)
|
|
177
171
|
}),
|
|
178
172
|
)
|
|
179
173
|
return next(params.startkey, [], params.limit ?? Infinity)
|