inibase 1.5.8 → 1.5.10

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -228,7 +228,7 @@ export default class Inibase {
228
228
  // if schema file exists, update columns files names based on field id
229
229
  if ((await File.isExists(join(tablePath, `schema.${this.schemaFileExtension}`))) &&
230
230
  table.schema?.length) {
231
- const replaceOldPathes = Utils.findChangedProperties(this.schemaToIdsPath(tableName, table.schema), this.schemaToIdsPath(tableName, schema));
231
+ const replaceOldPathes = Utils.findChangedProperties(this.schemaToIdsPath(tableName, table.schema.filter(({ key }) => !["createdAt", "updatedAt"].includes(key))), this.schemaToIdsPath(tableName, schema));
232
232
  if (replaceOldPathes)
233
233
  await Promise.allSettled(Object.entries(replaceOldPathes).map(async ([oldPath, newPath]) => {
234
234
  if (await File.isExists(join(tablePath, oldPath))) {
@@ -1049,6 +1049,18 @@ export default class Inibase {
1049
1049
  searchLogicalOperator = logic;
1050
1050
  }
1051
1051
  }
1052
+ else if (Array.isArray(logicalChild)) {
1053
+ const crit = logicalChild
1054
+ .map((item) => typeof item === "string"
1055
+ ? Utils.FormatObjectCriteriaValue(item)
1056
+ : ["=", item])
1057
+ .filter(Boolean);
1058
+ if (crit.length) {
1059
+ searchOperator = crit.map((c) => c[0]);
1060
+ searchComparedAtValue = crit.map((c) => c[1]);
1061
+ searchLogicalOperator = logic;
1062
+ }
1063
+ }
1052
1064
  delete value[logic];
1053
1065
  }
1054
1066
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.5.8",
3
+ "version": "1.5.10",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Karim Amahtil",