feat: one-to-many relation helper

Allow one to specify that a field of a model is a foreign key.
It will generate a bunch of helper methods to query related entities
from one entity.
This commit is contained in:
Matthieu Bessat 2025-11-11 17:10:47 +01:00
parent 32ef1f7b33
commit 5f45671b74
25 changed files with 764 additions and 140 deletions

View file

@ -1,8 +1,12 @@
# Children justfile
reset-db *args:
rm sandbox.db
sqlite3 {{args}} sandbox.db < src/migrations/all.sql
touch tmp/db.db
rm tmp/db.db
sqlite3 {{args}} tmp/db.db < src/migrations/all.sql
seed-db:
sqlite3 tmp/db.db < src/migrations/all.sql
gen-sqlx:
../../target/release/sqlx-generator \