first_per_parent
sqllocks_spindle.engine.strategies.first_per_parent
¶
First-per-parent strategy — mark the first child row per parent group.
Generates a boolean column where the first row for each parent FK value is True and all subsequent rows are False. Used for flags like address.is_primary.
Example
"is_primary": { "generator": { "strategy": "first_per_parent", "parent_column": "customer_id", "default": true } }