How qwtel/sqlite-viewer-vscode works
SQLite Viewer is a VS Code extension for opening and inspecting SQLite files, including in VS Code for Web. The main workflow is file selection, custom-editor registration, document creation, database import into a worker, and presentation in the viewer UI. The README also documents virtualized scrolling, sorting, filtering, theme integration, and read-only/cached behavior; licensing commands are a separate capability. The core and webview implementation directories are present in the tree but were not sampled, so their internal responsibilities and links are shown only at directory level where documented or left unverified.
Main entry points: webWorker.ts Worker Setup · sqliteEditorProvider.ts Custom Editor Provider · extension.ts Extension Activation · sqliteDocument.ts SQLite Document
Components 18
VS Code Integration
- Extension Activation
src/extension.ts - Extension Commands
src/commands.ts - Custom Editor Provider
src/sqliteEditorProvider.ts - Telemetry
src/extension.ts
Document Lifecycle
- SQLite Document
src/sqliteDocument.ts - Document Utilities
src/util.ts
Database Runtime
- Worker Setup
src/webWorker.ts - Worker Transport
src/o/worker_threads.ts - Database Worker
src/worker.ts - SQLite Core
sqlite-viewer-core - Worker Interface
src/workerBundle.ts
Viewer Experience
- Webview Bridge
src/util.ts - Viewer UI
sqlite-viewer-vscode-page
Licensing
- License Service
- License Commands
src/commands.ts
Other components
- User
- SQLite File
- VS Code
Connections 19
- User → VS Code: opens file
README.md - VS Code → Extension Activation: activates
- Extension Activation → Custom Editor Provider: registers editors
src/extension.ts - Extension Activation → Extension Commands: registers commands
src/extension.ts - VS Code → Custom Editor Provider: routes file
- Custom Editor Provider → SQLite Document: creates document
src/sqliteEditorProvider.ts - SQLite Document → Worker Setup: creates worker
src/sqliteDocument.ts - Worker Setup → Worker Transport: selects worker API
src/webWorker.ts - Worker Setup → SQLite Core: imports database
src/webWorker.ts - Worker Setup → SQLite File: reads file bytes
src/webWorker.ts - Worker Setup → Worker Interface: returns interface
src/webWorker.ts - SQLite Document → Worker Interface: uses worker interface
src/sqliteDocument.ts - SQLite Document → Document Utilities: uses utilities
src/sqliteDocument.ts - Custom Editor Provider → Webview Bridge: uses webview collection
src/sqliteEditorProvider.ts - Custom Editor Provider → Viewer UI: serves viewer
- User → Viewer UI: inspects database
- Viewer UI → VS Code: uses themed UI
- Extension Commands → License Service: requests registration
src/commands.ts - Extension Activation → Telemetry: reports events
src/extension.ts