ochre-sdk 0.20.18 → 0.20.19
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/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2341,10 +2341,15 @@ function buildXQuery$1(params, options) {
|
|
|
2341
2341
|
if (queryFilters.length > 0) filterPredicates.push(`(${queryFilters})`);
|
|
2342
2342
|
const itemFilters = filterPredicates.length > 0 ? `[${filterPredicates.join(" and ")}]` : "";
|
|
2343
2343
|
const orderedItemsClause = buildOrderedItemsClause(sort);
|
|
2344
|
-
return `<ochre>{${`let $
|
|
2344
|
+
return `<ochre>{${`let $rawItems := ${version === 2 ? "doc()" : "input()"}/ochre
|
|
2345
2345
|
${setScopeFilter}
|
|
2346
2346
|
${itemFilters}
|
|
2347
2347
|
|
|
2348
|
+
let $items :=
|
|
2349
|
+
for $item at $position in $rawItems
|
|
2350
|
+
where empty($rawItems[position() lt $position][@uuid = $item/@uuid])
|
|
2351
|
+
return $item
|
|
2352
|
+
|
|
2348
2353
|
let $totalCount := count($items)
|
|
2349
2354
|
${orderedItemsClause}
|
|
2350
2355
|
|