@heyhru/app-dms-server 0.1.3 → 0.1.5

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.
@@ -1,31 +0,0 @@
1
- import "./chunk-QGM4M3NI.js";
2
-
3
- // src/db/sqlite.adapter.ts
4
- import { createSqlite, getSqlite, closeSqlite } from "@heyhru/server-util-sqlite";
5
- function createSqliteAdapter(path) {
6
- createSqlite({ path });
7
- return {
8
- async query(sql, params = []) {
9
- const bound = params;
10
- return getSqlite().prepare(sql).all(...bound);
11
- },
12
- async queryOne(sql, params = []) {
13
- const bound = params;
14
- return getSqlite().prepare(sql).get(...bound);
15
- },
16
- async run(sql, params = []) {
17
- const bound = params;
18
- const result = getSqlite().prepare(sql).run(...bound);
19
- return { changes: result.changes };
20
- },
21
- async exec(sql) {
22
- getSqlite().exec(sql);
23
- },
24
- async close() {
25
- closeSqlite();
26
- }
27
- };
28
- }
29
- export {
30
- createSqliteAdapter
31
- };