lnd/sqldb
positiveblue 5a7d7c2e4f
sqldb: add the sqldb package
This commit provides the scaffolding for using the new sql stores.
The new interfaces, structs and methods are in sync with other projects
like Taproot Assets.

- Transactional Queries: the sqldb package defines the interfaces required
to execute transactional queries to our storage interface.

- Migration Files Embedded: the migration files are embedded into the binary.

- Database Migrations: I kept the use of 'golang-migrate' to ensure our
codebase remains in sync with the other projects, but can be changed.

- Build Flags for Conditional DB Target: flexibility to specify our database
target at compile-time based on the build flags in the same way we do
with our kv stores.

- Update modules: ran `go mod tidy`.
2023-07-27 03:31:12 -07:00
..
sqlc sqlc: generate go code from SQL 2023-07-10 17:57:06 -07:00
interfaces.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
log.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
migrations.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
postgres_fixture.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
postgres_test.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
postgres.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
schemas.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
sqlerrors.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
sqlite_test.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00
sqlite.go sqldb: add the sqldb package 2023-07-27 03:31:12 -07:00