Ecto.Adapters.Mnesia.Constraint (Ecto3 Mnesia v0.3.0) View Source

Functions for checking records against constraints

Link to this section Summary

Functions

Check parameters against constraints.

Ensure constraints table has been created

Returns constraints for the given table

Register a constraint

Link to this section Types

Specs

constraint() :: {:unique | :foreign_key | :exclusion | :check, String.t()}

Link to this section Functions

Specs

check(Ecto.Adapters.Mnesia.Source.t(), Keyword.t()) :: [constraint()]

Check parameters against constraints.

Returns eventually violated constraints

Ensure constraints table has been created

Returns constraints for the given table

Link to this macro

mnesia_constraints(args \\ [])

View Source (macro)
Link to this macro

mnesia_constraints(record, args)

View Source (macro)

Register a constraint