AshReferentialActions.Info (ash_referential_actions v0.1.0)

Copy Markdown View Source

Introspection helpers for AshReferentialActions.

Summary

Functions

Returns the declared referential action, or nil for an unmarked relationship.

Returns true when the relationship declares the cascade action.

Returns true when the relationship declares the do_nothing action.

Returns true if the resource module has the extension.

Returns true for forward relationships whose target must be live.

Returns true when the relationship declares the nilify action.

Returns true when the relationship declares the restrict action.

Returns true for reverse relationships that restrict target destruction.

Returns true when reverse and forward relationship key attributes line up.

Functions

action(relationship)

Returns the declared referential action, or nil for an unmarked relationship.

cascade?(relationship)

Returns true when the relationship declares the cascade action.

do_nothing?(relationship)

Returns true when the relationship declares the do_nothing action.

enabled?(resource)

Returns true if the resource module has the extension.

guarded?(relationship)

Returns true for forward relationships whose target must be live.

nilify?(relationship)

Returns true when the relationship declares the nilify action.

restrict?(relationship)

Returns true when the relationship declares the restrict action.

restrict_reverse?(relationship)

Returns true for reverse relationships that restrict target destruction.

reverse_of?(reverse, forward)

Returns true when reverse and forward relationship key attributes line up.