@sqb/sqlite 6.1.0 → 6.1.1
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/README.md +1 -1
- package/constants.d.ts +1 -1
- package/constants.js +1 -1
- package/package.json +4 -4
- package/sqlite-adapter.js +4 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ import { SqbClient } from '@sqb/connect';
|
|
|
42
42
|
|
|
43
43
|
const client = new SqbClient({
|
|
44
44
|
driver: 'sqlite',
|
|
45
|
-
database: '/path/to/database.db', // or ':memory:'
|
|
45
|
+
database: '/path/to/database.db', // or ':memory:' (optionally suffixed, e.g. ':memory:test1')
|
|
46
46
|
});
|
|
47
47
|
```
|
|
48
48
|
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/sqlite",
|
|
3
3
|
"description": "SQB adapter for Node.js and Bun's native SQLite drivers",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.1",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://www.sqbjs.org",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"tslib": "^2.8.1"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@sqb/builder": "^6.1.
|
|
13
|
-
"@sqb/connect": "^6.1.
|
|
14
|
-
"@sqb/sqlite-dialect": "^6.1.
|
|
12
|
+
"@sqb/builder": "^6.1.1",
|
|
13
|
+
"@sqb/connect": "^6.1.1",
|
|
14
|
+
"@sqb/sqlite-dialect": "^6.1.1"
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"module": "./index.js",
|
package/sqlite-adapter.js
CHANGED
|
@@ -45,7 +45,10 @@ export class SqliteAdapter {
|
|
|
45
45
|
intlDb._refCount++;
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
|
|
48
|
+
// SQLite only knows the bare `:memory:`; a `:memory:name` passed
|
|
49
|
+
// through as-is would open a file of that name. Every name gets its
|
|
50
|
+
// own `:memory:` handle, kept apart by the cache key.
|
|
51
|
+
intlDb = (await openDatabase(isMemory ? ':memory:' : dbName));
|
|
49
52
|
intlDb._refCount = isMemory ? 0 : 1;
|
|
50
53
|
dbCache.set(dbName, intlDb);
|
|
51
54
|
}
|