@travetto/model-sqlite 8.0.0-alpha.31 → 8.0.0-alpha.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-sqlite",
3
- "version": "8.0.0-alpha.31",
3
+ "version": "8.0.0-alpha.33",
4
4
  "type": "module",
5
5
  "description": "SQLite backing for the travetto model module, with real-time modeling support for SQL schemas.",
6
6
  "keywords": [
@@ -27,11 +27,11 @@
27
27
  "directory": "module/model-sqlite"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/config": "^8.0.0-alpha.25",
31
- "@travetto/context": "^8.0.0-alpha.22",
32
- "@travetto/model": "^8.0.0-alpha.26",
33
- "@travetto/model-query": "^8.0.0-alpha.28",
34
- "@travetto/model-sql": "^8.0.0-alpha.31"
30
+ "@travetto/config": "^8.0.0-alpha.26",
31
+ "@travetto/context": "^8.0.0-alpha.23",
32
+ "@travetto/model": "^8.0.0-alpha.27",
33
+ "@travetto/model-query": "^8.0.0-alpha.30",
34
+ "@travetto/model-sql": "^8.0.0-alpha.33"
35
35
  },
36
36
  "travetto": {
37
37
  "displayName": "SQLite Model Service"
package/src/connection.ts CHANGED
@@ -79,8 +79,8 @@ export class SqliteConnection extends SQLConnection<DatabaseSync> {
79
79
  // Register custom json_contains function for JSON containment checks
80
80
  db.function('json_contains', (target, candidate) => {
81
81
  try {
82
- const tgt = JSON.parse(String(target));
83
- const cand = JSON.parse(String(candidate));
82
+ const targetRaw = JSON.parse(String(target));
83
+ const candidateRaw = JSON.parse(String(candidate));
84
84
 
85
85
  const matches = (t: unknown, c: unknown): boolean => {
86
86
  if (c === null) {
@@ -103,7 +103,7 @@ export class SqliteConnection extends SQLConnection<DatabaseSync> {
103
103
  return t === c;
104
104
  };
105
105
 
106
- return matches(tgt, cand) ? 1 : 0;
106
+ return matches(targetRaw, candidateRaw) ? 1 : 0;
107
107
  } catch {
108
108
  return 0;
109
109
  }