@humbdb/sqlite 0.0.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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Humb contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @humbdb/sqlite
|
|
2
|
+
|
|
3
|
+
SQLite driver for Humb. Implements the `DatabaseAdapter` contract from `@humbdb/driver-contract`.
|
|
4
|
+
|
|
5
|
+
The whole connection is opened in read-only mode (`better-sqlite3`'s `readonly: true`) - the
|
|
6
|
+
authoritative read-only backstop, equivalent to `@humbdb/postgres`'s `READ ONLY` transaction. See
|
|
7
|
+
[`docs/product-specs/connect-and-inspect-sqlite.md`](../../../docs/product-specs/connect-and-inspect-sqlite.md).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ConnectionTarget, DatabaseOverview, TableMetadata, RowPage } from '@humbdb/core';
|
|
2
|
+
import { DatabaseAdapter, AdapterFactory } from '@humbdb/driver-contract';
|
|
3
|
+
export { ReadOnlyViolationError, assertReadOnly } from '@humbdb/driver-contract';
|
|
4
|
+
|
|
5
|
+
declare class SqliteAdapter implements DatabaseAdapter {
|
|
6
|
+
private readonly target;
|
|
7
|
+
readonly engine = "sqlite";
|
|
8
|
+
private db;
|
|
9
|
+
constructor(target: ConnectionTarget);
|
|
10
|
+
private getDb;
|
|
11
|
+
connect(): Promise<void>;
|
|
12
|
+
disconnect(): Promise<void>;
|
|
13
|
+
ping(): Promise<boolean>;
|
|
14
|
+
getVersion(): Promise<string>;
|
|
15
|
+
getOverview(): Promise<DatabaseOverview>;
|
|
16
|
+
getTable(schema: string, table: string): Promise<TableMetadata>;
|
|
17
|
+
getRows(schema: string, table: string, page: number, pageSize: number): Promise<RowPage>;
|
|
18
|
+
runReadOnlyQuery(sql: string): Promise<RowPage>;
|
|
19
|
+
}
|
|
20
|
+
/** Factory that creates {@link SqliteAdapter} instances for SQLite targets. */
|
|
21
|
+
declare const sqliteAdapterFactory: AdapterFactory;
|
|
22
|
+
|
|
23
|
+
export { SqliteAdapter, sqliteAdapterFactory };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { resolve } from "path";
|
|
3
|
+
import { assertReadOnly, resolvePageRequest } from "@humbdb/driver-contract";
|
|
4
|
+
import Database from "better-sqlite3";
|
|
5
|
+
import { assertReadOnly as assertReadOnly2, ReadOnlyViolationError } from "@humbdb/driver-contract";
|
|
6
|
+
var MAIN_SCHEMA = "main";
|
|
7
|
+
function quoteIdent(name) {
|
|
8
|
+
return `"${name.replace(/"/g, '""')}"`;
|
|
9
|
+
}
|
|
10
|
+
function fetchIndexes(db, table) {
|
|
11
|
+
const indexList = db.pragma(`index_list(${quoteIdent(table)})`);
|
|
12
|
+
return indexList.map((index) => {
|
|
13
|
+
const indexInfo = db.pragma(`index_info(${quoteIdent(index.name)})`);
|
|
14
|
+
return {
|
|
15
|
+
name: index.name,
|
|
16
|
+
columns: indexInfo.map((column) => column.name),
|
|
17
|
+
unique: index.unique === 1,
|
|
18
|
+
primary: index.origin === "pk"
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
var SqliteAdapter = class {
|
|
23
|
+
constructor(target) {
|
|
24
|
+
this.target = target;
|
|
25
|
+
}
|
|
26
|
+
target;
|
|
27
|
+
engine = "sqlite";
|
|
28
|
+
db;
|
|
29
|
+
getDb() {
|
|
30
|
+
if (!this.db) {
|
|
31
|
+
throw new Error("SqliteAdapter is not connected. Call connect() first.");
|
|
32
|
+
}
|
|
33
|
+
return this.db;
|
|
34
|
+
}
|
|
35
|
+
async connect() {
|
|
36
|
+
this.db = new Database(resolve(this.target.raw), { readonly: true, fileMustExist: true });
|
|
37
|
+
}
|
|
38
|
+
async disconnect() {
|
|
39
|
+
this.db?.close();
|
|
40
|
+
this.db = void 0;
|
|
41
|
+
}
|
|
42
|
+
async ping() {
|
|
43
|
+
const row = this.getDb().prepare("SELECT 1 AS ok").get();
|
|
44
|
+
return row?.ok === 1;
|
|
45
|
+
}
|
|
46
|
+
async getVersion() {
|
|
47
|
+
const row = this.getDb().prepare("SELECT sqlite_version() AS version").get();
|
|
48
|
+
return `SQLite ${row.version}`;
|
|
49
|
+
}
|
|
50
|
+
async getOverview() {
|
|
51
|
+
const tables = this.getDb().prepare(
|
|
52
|
+
"SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name"
|
|
53
|
+
).all();
|
|
54
|
+
const schemas = [
|
|
55
|
+
{ name: MAIN_SCHEMA, tables: tables.map((row) => row.name) }
|
|
56
|
+
];
|
|
57
|
+
return { engine: "sqlite", schemas };
|
|
58
|
+
}
|
|
59
|
+
async getTable(schema, table) {
|
|
60
|
+
const db = this.getDb();
|
|
61
|
+
const tableInfo = db.pragma(`table_info(${quoteIdent(table)})`);
|
|
62
|
+
const foreignKeyList = db.pragma(
|
|
63
|
+
`foreign_key_list(${quoteIdent(table)})`
|
|
64
|
+
);
|
|
65
|
+
const foreignKeys = new Set(foreignKeyList.map((fk) => fk.from));
|
|
66
|
+
const columns = tableInfo.map((row) => ({
|
|
67
|
+
name: row.name,
|
|
68
|
+
// SQLite's declared column type is a free-form string (may even be empty) - "" reads
|
|
69
|
+
// awkwardly in the UI, so fall back to a neutral placeholder rather than an empty cell.
|
|
70
|
+
dataType: row.type || "any",
|
|
71
|
+
nullable: row.notnull === 0,
|
|
72
|
+
isPrimaryKey: row.pk > 0,
|
|
73
|
+
isForeignKey: foreignKeys.has(row.name)
|
|
74
|
+
}));
|
|
75
|
+
const indexes = fetchIndexes(db, table);
|
|
76
|
+
const { count } = db.prepare(`SELECT COUNT(*) AS count FROM ${quoteIdent(table)}`).get();
|
|
77
|
+
return { schema, name: table, columns, indexes, rowCount: count };
|
|
78
|
+
}
|
|
79
|
+
async getRows(schema, table, page, pageSize) {
|
|
80
|
+
const { page: safePage, pageSize: safePageSize, offset } = resolvePageRequest(page, pageSize);
|
|
81
|
+
const stmt = this.getDb().prepare(`SELECT * FROM ${quoteIdent(table)} LIMIT ? OFFSET ?`);
|
|
82
|
+
const rows = stmt.all(safePageSize, offset);
|
|
83
|
+
return {
|
|
84
|
+
columns: stmt.columns().map((column) => column.name),
|
|
85
|
+
rows,
|
|
86
|
+
page: safePage,
|
|
87
|
+
pageSize: safePageSize
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async runReadOnlyQuery(sql) {
|
|
91
|
+
assertReadOnly(sql);
|
|
92
|
+
const stmt = this.getDb().prepare(sql);
|
|
93
|
+
const rows = stmt.all();
|
|
94
|
+
return {
|
|
95
|
+
columns: stmt.columns().map((column) => column.name),
|
|
96
|
+
rows,
|
|
97
|
+
page: 0,
|
|
98
|
+
pageSize: rows.length
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var sqliteAdapterFactory = {
|
|
103
|
+
engine: "sqlite",
|
|
104
|
+
supports: (target) => target.engine === "sqlite",
|
|
105
|
+
create: (target) => new SqliteAdapter(target)
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
ReadOnlyViolationError,
|
|
109
|
+
SqliteAdapter,
|
|
110
|
+
assertReadOnly2 as assertReadOnly,
|
|
111
|
+
sqliteAdapterFactory
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * SQLite driver for Humb.\n *\n * Implements the engine-agnostic {@link DatabaseAdapter} contract from `@humbdb/driver-contract`.\n * See ARCHITECTURE.md and docs/product-specs/connect-and-inspect-sqlite.md.\n */\nimport { resolve } from \"node:path\";\nimport type {\n ColumnMetadata,\n ConnectionTarget,\n DatabaseOverview,\n IndexMetadata,\n RowPage,\n SchemaMetadata,\n TableMetadata\n} from \"@humbdb/core\";\nimport { assertReadOnly, resolvePageRequest } from \"@humbdb/driver-contract\";\nimport type { AdapterFactory, DatabaseAdapter } from \"@humbdb/driver-contract\";\nimport Database from \"better-sqlite3\";\n\nexport { assertReadOnly, ReadOnlyViolationError } from \"@humbdb/driver-contract\";\n\n/** SQLite has a single implicit namespace; the UI still expects a schema name, per the spec. */\nconst MAIN_SCHEMA = \"main\";\n\n/** Quote a SQL identifier safely (SQLite uses the standard `\"...\"` convention, like Postgres). */\nfunction quoteIdent(name: string): string {\n return `\"${name.replace(/\"/g, '\"\"')}\"`;\n}\n\ninterface TableInfoRow {\n cid: number;\n name: string;\n type: string;\n notnull: number;\n dflt_value: unknown;\n pk: number;\n}\n\ninterface IndexListRow {\n seq: number;\n name: string;\n unique: number;\n origin: \"c\" | \"u\" | \"pk\";\n partial: number;\n}\n\ninterface IndexInfoRow {\n seqno: number;\n cid: number;\n name: string;\n}\n\ninterface ForeignKeyListRow {\n id: number;\n seq: number;\n table: string;\n from: string;\n to: string | null;\n on_update: string;\n on_delete: string;\n match: string;\n}\n\n/** Fetch index metadata for a table via SQLite's pragmas. */\nfunction fetchIndexes(db: Database.Database, table: string): IndexMetadata[] {\n const indexList = db.pragma(`index_list(${quoteIdent(table)})`) as IndexListRow[];\n return indexList.map((index) => {\n const indexInfo = db.pragma(`index_info(${quoteIdent(index.name)})`) as IndexInfoRow[];\n return {\n name: index.name,\n columns: indexInfo.map((column) => column.name),\n unique: index.unique === 1,\n primary: index.origin === \"pk\"\n };\n });\n}\n\nexport class SqliteAdapter implements DatabaseAdapter {\n public readonly engine = \"sqlite\";\n private db: Database.Database | undefined;\n\n constructor(private readonly target: ConnectionTarget) {}\n\n private getDb(): Database.Database {\n if (!this.db) {\n throw new Error(\"SqliteAdapter is not connected. Call connect() first.\");\n }\n return this.db;\n }\n\n async connect(): Promise<void> {\n // The whole connection is opened read-only - the authoritative backstop, equivalent to\n // @humbdb/postgres's READ ONLY transaction (see runReadOnlyQuery below and the product spec).\n // SQLite itself refuses any write through this handle, regardless of what assertReadOnly's\n // string scan misses.\n this.db = new Database(resolve(this.target.raw), { readonly: true, fileMustExist: true });\n }\n\n async disconnect(): Promise<void> {\n this.db?.close();\n this.db = undefined;\n }\n\n async ping(): Promise<boolean> {\n const row = this.getDb().prepare(\"SELECT 1 AS ok\").get() as { ok: number } | undefined;\n return row?.ok === 1;\n }\n\n async getVersion(): Promise<string> {\n const row = this.getDb().prepare(\"SELECT sqlite_version() AS version\").get() as {\n version: string;\n };\n return `SQLite ${row.version}`;\n }\n\n async getOverview(): Promise<DatabaseOverview> {\n const tables = this.getDb()\n .prepare(\n \"SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name\"\n )\n .all() as Array<{ name: string }>;\n\n const schemas: SchemaMetadata[] = [\n { name: MAIN_SCHEMA, tables: tables.map((row) => row.name) }\n ];\n\n return { engine: \"sqlite\", schemas };\n }\n\n async getTable(schema: string, table: string): Promise<TableMetadata> {\n const db = this.getDb();\n const tableInfo = db.pragma(`table_info(${quoteIdent(table)})`) as TableInfoRow[];\n const foreignKeyList = db.pragma(\n `foreign_key_list(${quoteIdent(table)})`\n ) as ForeignKeyListRow[];\n const foreignKeys = new Set(foreignKeyList.map((fk) => fk.from));\n\n const columns: ColumnMetadata[] = tableInfo.map((row) => ({\n name: row.name,\n // SQLite's declared column type is a free-form string (may even be empty) - \"\" reads\n // awkwardly in the UI, so fall back to a neutral placeholder rather than an empty cell.\n dataType: row.type || \"any\",\n nullable: row.notnull === 0,\n isPrimaryKey: row.pk > 0,\n isForeignKey: foreignKeys.has(row.name)\n }));\n\n const indexes = fetchIndexes(db, table);\n\n const { count } = db.prepare(`SELECT COUNT(*) AS count FROM ${quoteIdent(table)}`).get() as {\n count: number;\n };\n\n return { schema, name: table, columns, indexes, rowCount: count };\n }\n\n async getRows(schema: string, table: string, page: number, pageSize: number): Promise<RowPage> {\n const { page: safePage, pageSize: safePageSize, offset } = resolvePageRequest(page, pageSize);\n\n const stmt = this.getDb().prepare(`SELECT * FROM ${quoteIdent(table)} LIMIT ? OFFSET ?`);\n const rows = stmt.all(safePageSize, offset) as Array<Record<string, unknown>>;\n\n return {\n columns: stmt.columns().map((column) => column.name),\n rows,\n page: safePage,\n pageSize: safePageSize\n };\n }\n\n async runReadOnlyQuery(sql: string): Promise<RowPage> {\n assertReadOnly(sql);\n\n // assertReadOnly is a heuristic string check; the read-only connection opened in connect() is\n // the authoritative guarantee - SQLite refuses any write through this handle regardless of\n // what the string check missed (see connect()'s comment).\n const stmt = this.getDb().prepare(sql);\n const rows = stmt.all() as Array<Record<string, unknown>>;\n\n return {\n columns: stmt.columns().map((column) => column.name),\n rows,\n page: 0,\n pageSize: rows.length\n };\n }\n}\n\n/** Factory that creates {@link SqliteAdapter} instances for SQLite targets. */\nexport const sqliteAdapterFactory: AdapterFactory = {\n engine: \"sqlite\",\n supports: (target) => target.engine === \"sqlite\",\n create: (target) => new SqliteAdapter(target)\n};\n"],"mappings":"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","names":["assertReadOnly"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@humbdb/sqlite",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "SQLite driver for Humb.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"better-sqlite3": "^11.10.0",
|
|
20
|
+
"@humbdb/core": "0.0.1",
|
|
21
|
+
"@humbdb/driver-contract": "0.0.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
25
|
+
"@humbdb/config": "0.0.0"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsup",
|
|
29
|
+
"dev": "tsup --watch",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"clean": "rimraf dist .turbo"
|
|
33
|
+
}
|
|
34
|
+
}
|