Documentation
¶
Overview ¶
Example: composite-keys
A composite primary key, declared as a comparable Go struct passed to drel.Model[K]. Each exported field of the key struct becomes one key column, named by its own db tag. A composite key is always application-assigned: there is no auto-increment for it, so the key is set with SetID before Add.
Usage:
cd examples/composite-keys go run ../../cmd/drel generate go run .
Click to show internal directories.
Click to hide internal directories.