How irabeny89/gosqlitex works
gosqlitex is a Go SQLite wrapper with separate read and write pools, plus migration APIs and the mig8 command-line tool. The main workflow opens a client, routes application queries to the appropriate pool, and lets mig8 generate, apply, or list migrations. The sampled source shows pool routing and migration orchestration; other documented API behavior is represented at the public API level where implementation details were not sampled.
Main entry points: mig8.go mig8 command · db.go Read pool
Components 13
Database Client
- Client API
db.go - Open client
db.go - Pool setup
db.go - Read pool
db.go - Write pool
db.go
Migrations
- Migration API
db.go - Migration runner
db.go - Migration helpers
db.go - Migration files
mig8 CLI
- mig8 command
cmd/mig8/mig8.go
Other components
- Go application
- SQLite database
- CLI operator
Connections 19
- Go application → Open client: opens
- Open client → Pool setup: configures
- Pool setup → Write pool: creates writer
- Pool setup → Read pool: creates readers
- Read pool → SQLite database: reads
- Write pool → SQLite database: writes
- Go application → Client API: calls
- Client API → Read pool: routes reads
- Client API → Write pool: routes writes
- Go application → Migration API: calls
- Migration API → Migration runner: runs or lists
- Migration runner → Migration helpers: uses
- Migration runner → Migration files: reads
- Migration helpers → Write pool: records changes
- Migration helpers → Read pool: checks records
- CLI operator → mig8 command: runs
- mig8 command → Open client: opens client
- mig8 command → Migration API: runs or lists
- mig8 command → Migration files: generates file