inibase 1.4.5 → 1.4.7
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 +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -555,7 +555,7 @@ export default class Inibase {
|
|
|
555
555
|
return null;
|
|
556
556
|
}
|
|
557
557
|
default:
|
|
558
|
-
return value;
|
|
558
|
+
return typeof value === 'string' ? value.trim() : value;
|
|
559
559
|
}
|
|
560
560
|
return null;
|
|
561
561
|
}
|
|
@@ -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)));
|