sqlite-hub 0.12.0 → 0.16.0
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 +12 -4
- package/frontend/js/api.js +4 -2
- package/frontend/js/app.js +632 -12
- package/frontend/js/components/modal.js +432 -3
- package/frontend/js/components/queryEditor.js +9 -1
- package/frontend/js/components/queryResults.js +79 -17
- package/frontend/js/components/rowEditorPanel.js +204 -10
- package/frontend/js/components/sidebar.js +101 -18
- package/frontend/js/components/tableDesignerEditor.js +69 -11
- package/frontend/js/store.js +227 -9
- package/frontend/js/utils/copyColumnExport.js +117 -0
- package/frontend/js/utils/exportFilenames.js +32 -0
- package/frontend/js/utils/filePathPreview.js +315 -0
- package/frontend/js/utils/format.js +1 -1
- package/frontend/js/utils/rowEditorJson.js +65 -0
- package/frontend/js/utils/sqlFormatter.js +691 -0
- package/frontend/js/utils/tableDesigner.js +178 -6
- package/frontend/js/utils/textCellStats.js +20 -0
- package/frontend/js/utils/timestampPreview.js +264 -0
- package/frontend/js/views/charts.js +3 -1
- package/frontend/js/views/data.js +34 -2
- package/frontend/js/views/editor.js +48 -1
- package/frontend/js/views/settings.js +0 -3
- package/frontend/js/views/structure.js +154 -212
- package/frontend/styles/base.css +6 -0
- package/frontend/styles/components.css +463 -2
- package/frontend/styles/structure-graph.css +0 -3
- package/frontend/styles/tailwind.generated.css +1 -1
- package/frontend/styles/tokens.css +1 -1
- package/package.json +2 -3
- package/server/services/sqlite/introspection.js +10 -0
- package/server/services/sqlite/sqlExecutor.js +29 -0
- package/server/services/sqlite/tableDesigner/changeAnalysis.js +25 -1
- package/server/services/sqlite/tableDesigner/schemaMapping.js +105 -10
- package/server/services/sqlite/tableDesigner/validation.js +60 -2
- package/server/services/sqlite/tableDesignerService.js +1 -1
- package/tests/check-constraint-options.test.js +14 -0
- package/tests/export-filenames.test.js +34 -0
- package/tests/file-path-preview.test.js +165 -0
- package/tests/row-editor-json.test.js +82 -0
- package/tests/row-editor-timestamp-preview.test.js +192 -0
- package/tests/sql-formatter.test.js +173 -0
- package/tests/sql-highlight.test.js +38 -0
- package/tests/table-designer-v2-unique-constraints.test.js +78 -0
- package/tests/text-cell-stats.test.js +38 -0
- package/fill.js +0 -526
package/README.md
CHANGED
|
@@ -16,9 +16,11 @@ SQLite Hub keeps that workflow sharp:
|
|
|
16
16
|
- filter, sort, page through, and export table data
|
|
17
17
|
- inspect schema, structure, and relationships
|
|
18
18
|
- edit records in place with an SQL diff preview before saving
|
|
19
|
-
- export tables and query results as CSV, TSV, Markdown, duplicate as table
|
|
19
|
+
- export tables and query results as CSV, TSV, Markdown, or duplicate them as a table
|
|
20
|
+
- copy result columns with formatting, headers, first-10 previews, TXT export, and Markdown todo export
|
|
21
|
+
- switch between recent databases with sidebar quick picks
|
|
20
22
|
- create simple local backups of the active database
|
|
21
|
-
- run SQL in a syntax-highlighted editor with history, messages, and performance metrics
|
|
23
|
+
- run and format SQL in a syntax-highlighted editor with history, messages, and performance metrics
|
|
22
24
|
- turn query-history results into local charts
|
|
23
25
|
- create and edit tables with a live SQL preview
|
|
24
26
|
- stay local and move fast
|
|
@@ -35,7 +37,7 @@ Inspect tables, columns, types, indexes, foreign keys, and schema details withou
|
|
|
35
37
|
|
|
36
38
|

|
|
37
39
|
|
|
38
|
-
Scan rows, sort fast, move through local data quickly, and export full tables as CSV. The Data browser supports table search, page sizes up to 250 rows, and advanced filters with column/operator/value controls. Text filters support case-insensitive `contains`, `not contains`, and exact `equals` matching.
|
|
40
|
+
Scan rows, sort fast, move through local data quickly, and export full tables as CSV, TSV, or Markdown. The Data browser also supports duplicating exports as a new table, table search, page sizes up to 250 rows, and advanced filters with column/operator/value controls. Text filters support case-insensitive `contains`, `not contains`, and exact `equals` matching.
|
|
39
41
|
|
|
40
42
|
### Row editing
|
|
41
43
|
|
|
@@ -47,7 +49,9 @@ Open one record, edit it in place, preview the SQL diff, then commit. SQLite Hub
|
|
|
47
49
|
|
|
48
50
|

|
|
49
51
|
|
|
50
|
-
Write queries in a syntax-highlighted editor, inspect results in the same workflow, and export result sets as CSV. Query drafts survive reloads, query history can be searched and saved, and direct single-table `SELECT` results can be edited from the result grid.
|
|
52
|
+
Write queries in a syntax-highlighted editor, format SQL with the editor Format button, inspect results in the same workflow, and export result sets as CSV, TSV, Markdown, or duplicate them as a table. Query drafts survive reloads, query history can be searched and saved, and direct single-table `SELECT` results can be edited from the result grid.
|
|
53
|
+
|
|
54
|
+
Result column menus include copy actions for a full column, a column with header, or the first 10 values. The same modal can preview the output, copy it, export it as TXT, or turn a column into Markdown todo items.
|
|
51
55
|
|
|
52
56
|
The bottom panel keeps separate tabs for:
|
|
53
57
|
|
|
@@ -77,6 +81,10 @@ Configure a media table, tag table, and mapping table, then work through a taggi
|
|
|
77
81
|
|
|
78
82
|
SQLite Hub remembers common workspace preferences in local storage, including hidden panels, selected editor tabs, query drafts, chart panels, table row size, and Table Designer preview visibility.
|
|
79
83
|
|
|
84
|
+
### Database quick picks
|
|
85
|
+
|
|
86
|
+
The active database footer in the sidebar opens a quick-pick panel with the five most recent databases, so you can switch databases without going back to the Connections view.
|
|
87
|
+
|
|
80
88
|
### Simple backups
|
|
81
89
|
|
|
82
90
|
Create timestamped local backups of the active SQLite database in one click. Backups are stored as plain file copies in a local `backups` folder next to the database.
|
package/frontend/js/api.js
CHANGED
|
@@ -46,7 +46,7 @@ async function download(path, options = {}) {
|
|
|
46
46
|
const blob = await response.blob();
|
|
47
47
|
const disposition = response.headers.get("content-disposition") ?? "";
|
|
48
48
|
const match = disposition.match(/filename="([^"]+)"/i);
|
|
49
|
-
const filename = match?.[1]
|
|
49
|
+
const filename = String(options.filename ?? "").trim() || match?.[1] || options.fallbackFilename || "export.csv";
|
|
50
50
|
const url = URL.createObjectURL(blob);
|
|
51
51
|
const link = document.createElement("a");
|
|
52
52
|
|
|
@@ -440,7 +440,7 @@ export function getQueryExport(sql, format = "csv") {
|
|
|
440
440
|
});
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
export function downloadQueryExport(sql, format = "csv") {
|
|
443
|
+
export function downloadQueryExport(sql, format = "csv", options = {}) {
|
|
444
444
|
const normalizedFormat = normalizeTextExportFormat(format);
|
|
445
445
|
const extension = TEXT_EXPORT_EXTENSIONS[normalizedFormat];
|
|
446
446
|
|
|
@@ -448,6 +448,7 @@ export function downloadQueryExport(sql, format = "csv") {
|
|
|
448
448
|
method: "POST",
|
|
449
449
|
body: { sql },
|
|
450
450
|
fallbackFilename: `query-results.${extension}`,
|
|
451
|
+
filename: options.filename,
|
|
451
452
|
});
|
|
452
453
|
}
|
|
453
454
|
|
|
@@ -482,6 +483,7 @@ export function downloadTableExport(tableName, options = {}) {
|
|
|
482
483
|
method: "POST",
|
|
483
484
|
body: buildTableExportBody(tableName, { ...options, format: normalizedFormat }),
|
|
484
485
|
fallbackFilename: `${tableName || "table"}.${extension}`,
|
|
486
|
+
filename: options.filename,
|
|
485
487
|
});
|
|
486
488
|
}
|
|
487
489
|
|