masterrecord 0.3.14 → 0.3.16

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.
@@ -32,7 +32,10 @@
32
32
  "Bash(grep:*)",
33
33
  "Bash(npm audit:*)",
34
34
  "Bash(npm test:*)",
35
- "Bash(done)"
35
+ "Bash(done)",
36
+ "WebSearch",
37
+ "WebFetch(domain:github.com)",
38
+ "Bash(master=development masterrecord update-database qaContext)"
36
39
  ],
37
40
  "deny": [],
38
41
  "ask": []
package/SQLLiteEngine.js CHANGED
@@ -1222,6 +1222,17 @@ class SQLLiteEngine {
1222
1222
  this.db = db;
1223
1223
  this.dbType = type; // this will let us know which type of sqlengine to use.
1224
1224
  }
1225
+
1226
+ /**
1227
+ * Close database connection
1228
+ * Required for proper cleanup of better-sqlite3 native bindings
1229
+ */
1230
+ close() {
1231
+ if (this.db) {
1232
+ this.db.close();
1233
+ console.log('SQLite database closed');
1234
+ }
1235
+ }
1225
1236
  }
1226
1237
 
1227
1238
  module.exports = SQLLiteEngine;
package/context.js CHANGED
@@ -988,6 +988,9 @@ class context {
988
988
  case 'delete':
989
989
  toDelete.push(currentModel);
990
990
  break;
991
+ case 'track':
992
+ // Entity is tracked but unmodified - skip during saveChanges
993
+ break;
991
994
  default:
992
995
  console.warn(`[Context] Unknown entity state: ${currentModel.__state}`);
993
996
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "masterrecord",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "description": "An Object-relational mapping for the Master framework. Master Record connects classes to relational database tables to establish a database with almost zero-configuration ",
5
5
  "main": "MasterRecord.js",
6
6
  "bin": {