@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 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: true
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) => {