-
- On macOS, if you have Homebrew installed, run
brew install sqlite
- On macOS, if you have Homebrew installed, run
-
Install the SQLite ADBC driver:
dbc install sqlite
-
Customize the Go program
main.goas needed- Change the connection arguments in the
NewDatabase()call- Set
urito the location of the SQLite database file you want to query, or keep it set togames.sqliteto use the database file included with this example
- Set
- If you changed the database file, also change the SQL SELECT statement in
stmt.SetSqlQuery()
- Change the connection arguments in the
-
Run the Go program:
go mod tidy go run main.go