Add generated Bob database integration

This commit is contained in:
Eli Ribble 2025-11-04 23:11:32 +00:00
parent 8203c50b08
commit 7c4a181cdf
No known key found for this signature in database
32 changed files with 5128 additions and 2 deletions

View file

@ -13,3 +13,15 @@ nix develop
go build .
```
## Hacking
### bob
This uses the bob query framework. You can regenerate the models for bob with:
```
PSQL_DSN="postgresql://dbname?host=/var/run/postgresql&sslmode=disable" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest"
PSQL_DSN="postgresql://?host=/var/run/postgresql&sslmode=disable&dbname=nidus-sync" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest
```
This will generate a bunch of files. They're already committed, you only need this if you change the database schema in some way.