@holo-js/db-sqlite 0.2.6 → 0.3.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/dist/index.d.ts +3 -2
- package/dist/index.mjs +8 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DriverAdapter, DriverQueryResult, DriverExecutionResult, DatabaseOperationOptions } from '@holo-js/db';
|
|
1
|
+
import { DriverAdapter, DriverQueryResult, DriverExecutionResult, DatabaseOperationOptions, DatabaseDriverFactory } from '@holo-js/db';
|
|
2
2
|
export { DriverAdapter, DriverExecutionResult, DriverQueryResult } from '@holo-js/db';
|
|
3
3
|
|
|
4
4
|
type SQLiteTransactionMode = 'deferred' | 'immediate' | 'exclusive';
|
|
@@ -47,5 +47,6 @@ declare class SQLiteAdapter implements DriverAdapter {
|
|
|
47
47
|
private resolveBeginStatement;
|
|
48
48
|
}
|
|
49
49
|
declare function createSQLiteAdapter(options?: SQLiteAdapterOptions): SQLiteAdapter;
|
|
50
|
+
declare const sqliteDatabaseDriverFactory: DatabaseDriverFactory;
|
|
50
51
|
|
|
51
|
-
export { SQLiteAdapter, type SQLiteAdapterOptions, type SQLiteDatabaseLike, type SQLiteStatementLike, createSQLiteAdapter };
|
|
52
|
+
export { SQLiteAdapter, type SQLiteAdapterOptions, type SQLiteDatabaseLike, type SQLiteStatementLike, createSQLiteAdapter, sqliteDatabaseDriverFactory };
|
package/dist/index.mjs
CHANGED
|
@@ -120,7 +120,14 @@ var SQLiteAdapter = class {
|
|
|
120
120
|
function createSQLiteAdapter(options = {}) {
|
|
121
121
|
return new SQLiteAdapter(options);
|
|
122
122
|
}
|
|
123
|
+
var sqliteDatabaseDriverFactory = Object.freeze({
|
|
124
|
+
driver: "sqlite",
|
|
125
|
+
create(connection) {
|
|
126
|
+
return createSQLiteAdapter({ filename: connection.url ?? connection.database ?? "./data/database.sqlite" });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
123
129
|
export {
|
|
124
130
|
SQLiteAdapter,
|
|
125
|
-
createSQLiteAdapter
|
|
131
|
+
createSQLiteAdapter,
|
|
132
|
+
sqliteDatabaseDriverFactory
|
|
126
133
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/db-sqlite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Holo-JS Framework - SQLite database adapter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"test": "vitest --run"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@holo-js/db": "^0.
|
|
26
|
+
"@holo-js/db": "^0.3.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"better-sqlite3": "^11.7.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@holo-js/db": "^0.
|
|
32
|
+
"@holo-js/db": "^0.3.1",
|
|
33
33
|
"@types/better-sqlite3": "^7.6.12",
|
|
34
34
|
"tsup": "^8.3.5",
|
|
35
35
|
"typescript": "^5.7.2",
|