inibase 1.4.5 → 1.4.6
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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1087,7 +1087,7 @@ export default class Inibase {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
if (criteriaAND && Utils.isObject(criteriaAND)) {
|
|
1090
|
-
const searchResult = await this.applyCriteria(tableName, options, criteriaAND, true, searchIn);
|
|
1090
|
+
const searchResult = await this.applyCriteria(tableName, criteriaOR ? { ...(options ?? {}), perPage: -1 } : options, criteriaAND, true, searchIn);
|
|
1091
1091
|
if (searchResult) {
|
|
1092
1092
|
searchIn = new Set(Object.keys(searchResult).map(Number));
|
|
1093
1093
|
RETURN = Utils.deepMerge(RETURN, Object.fromEntries(Object.entries(searchResult).filter(([_k, v], _i) => Object.keys(v).filter((key) => Object.keys(criteriaAND).find((criteriaKey) => criteriaKey === key || criteriaKey.startsWith(`${key}.`))).length)));
|