View Source Needle.Changesets (Bonfire v0.9.10-classic-beta.156)

Summary

Functions

Like Ecto.build_assoc/3, but can work with a Changeset

True if the schema object's current state is :built

Like Ecto.Changeset.cast but for Pointables, Virtuals and Mixins.

True if the schema object's current state is :deleted

True if the schema object's current state is :loaded

Like put_assoc!/3 but doesn't raise if the association doesn't exist

Like Ecto.Changeset.put_assoc/3 but for Pointables, Virtuals and Mixins.

Returns the schema object's current state.

true if the provided changeset or list of changesets is valid.

Functions

Link to this function

build_assoc(changeset, assoc_key, rel)

View Source

Like Ecto.build_assoc/3, but can work with a Changeset

True if the schema object's current state is :built

Link to this function

cast(changeset, params, cols)

View Source

Like Ecto.Changeset.cast but for Pointables, Virtuals and Mixins.

If a pointable or virtual, Generates an ID if one is not present.

Link to this function

cast_assoc(changeset, assoc_key, opts \\ [])

View Source
Link to this function

cast_belongs_to(changeset, assoc_key, assoc, opts)

View Source
Link to this function

cast_has_many(changeset, assoc_key, assoc, opts)

View Source
Link to this function

cast_has_one(changeset, assoc_key, assoc, opts)

View Source
Link to this function

config_for(module, key, default \\ [])

View Source

True if the schema object's current state is :deleted

True if the schema object's current state is :loaded

Link to this function

put_assoc(changeset, assoc_key, rels)

View Source

Like put_assoc!/3 but doesn't raise if the association doesn't exist

Link to this function

put_assoc!(changeset, assoc_key, rels)

View Source

Like Ecto.Changeset.put_assoc/3 but for Pointables, Virtuals and Mixins.

Copies across keys where possible.

Link to this function

put_id_on_mixins(attrs, mixin_names, pointable)

View Source
Link to this function

put_new_id(changeset, schema)

View Source

Returns the schema object's current state.

Link to this function

update_data(changeset, fun)

View Source

true if the provided changeset or list of changesets is valid.