@budibase/backend-core 2.32.13 → 2.32.14
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.js +4 -3
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/plugins.js.meta.json +1 -1
- package/dist/src/db/couch/DatabaseImpl.d.ts +1 -0
- package/dist/src/db/couch/DatabaseImpl.js +5 -3
- package/dist/src/db/couch/DatabaseImpl.js.map +1 -1
- package/package.json +4 -4
- package/src/db/couch/DatabaseImpl.ts +8 -4
package/dist/index.js
CHANGED
|
@@ -67896,12 +67896,13 @@ var DatabaseImpl = class _DatabaseImpl {
|
|
|
67896
67896
|
}
|
|
67897
67897
|
async getMultiple(ids, opts) {
|
|
67898
67898
|
ids = [...new Set(ids)];
|
|
67899
|
+
const includeDocs = !opts?.excludeDocs;
|
|
67899
67900
|
const response = await this.allDocs({
|
|
67900
67901
|
keys: ids,
|
|
67901
|
-
include_docs:
|
|
67902
|
+
include_docs: includeDocs
|
|
67902
67903
|
});
|
|
67903
67904
|
const rowUnavailable = (row) => {
|
|
67904
|
-
if (row.doc == null || "deleted" in row.value && row.value.deleted) {
|
|
67905
|
+
if (includeDocs && row.doc == null || row.value && "deleted" in row.value && row.value.deleted) {
|
|
67905
67906
|
return true;
|
|
67906
67907
|
}
|
|
67907
67908
|
return row.error === "not_found";
|
|
@@ -67913,7 +67914,7 @@ var DatabaseImpl = class _DatabaseImpl {
|
|
|
67913
67914
|
const missingIds = missing.map((row) => row.key).join(", ");
|
|
67914
67915
|
throw new Error(`Unable to get documents: ${missingIds}`);
|
|
67915
67916
|
}
|
|
67916
|
-
return rows.map((row) => row.doc);
|
|
67917
|
+
return rows.map((row) => includeDocs ? row.doc : row.value);
|
|
67917
67918
|
}
|
|
67918
67919
|
async remove(idOrDoc, rev) {
|
|
67919
67920
|
return this.performCall((db) => {
|