composite-keys

command
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 6 Imported by: 0

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 .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL