@nxtedition/lib 19.0.21 → 19.0.22
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 +10 -8
- package/package.json +1 -1
package/deepstream.js
CHANGED
|
@@ -119,19 +119,21 @@ function get(ds, name, ...args) {
|
|
|
119
119
|
)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
function query(ds, designId, options) {
|
|
122
|
+
function query(ds, designId, options, state = options.state ?? ds.record.PROVIDER) {
|
|
123
123
|
const next = (startkey, prevRows, limit) =>
|
|
124
124
|
!limit
|
|
125
125
|
? rxjs.of({ rows: prevRows ?? [] })
|
|
126
126
|
: ds.nxt.record
|
|
127
127
|
.observe(
|
|
128
|
-
designId
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
`${designId}:query?${qs.stringify(
|
|
129
|
+
{
|
|
130
|
+
...options,
|
|
131
|
+
startkey,
|
|
132
|
+
limit: Number.isFinite(limit) ? limit : null,
|
|
133
|
+
},
|
|
134
|
+
{ skipNulls: true },
|
|
135
|
+
)}`,
|
|
136
|
+
state,
|
|
135
137
|
)
|
|
136
138
|
.pipe(
|
|
137
139
|
rxjs.switchMap(({ rows, finished }) => {
|