View Source AshPostgres.Type behaviour (ash_postgres v2.4.17)

Postgres specific callbacks for Ash.Type.

Use this in addition to Ash.Type.

Summary

Callbacks

postgres_reference_expr(t, constraints, term)

(optional)
@callback postgres_reference_expr(Ash.Type.t(), Ash.Type.constraints(), term()) ::
  {:ok, term()} | :error

value_to_postgres_default(t, constraints, term)

(optional)
@callback value_to_postgres_default(Ash.Type.t(), Ash.Type.constraints(), term()) ::
  {:ok, String.t()} | :error