Back.Automatons.AutomatonTags (CAMI-Back v0.1.0)

View Source

The Automatons.AutomatonTags context.

Summary

Functions

Returns an %Ecto.Changeset{} for tracking automaton_tag changes.

Creates a automaton_tag.

Deletes a automaton_tag.

Gets a single automaton_tag.

Returns the list of automaton_tag.

Functions

change_automaton_tag(automaton_tag, attrs \\ %{})

Returns an %Ecto.Changeset{} for tracking automaton_tag changes.

Examples

iex> change_automaton_tag(automaton_tag)
%Ecto.Changeset{data: %AutomatonTag{}}

create_automaton_tag(attrs \\ %{})

Creates a automaton_tag.

Examples

iex> create_automaton_tag(%{field: value})
{:ok, %AutomatonTag{}}

iex> create_automaton_tag(%{field: bad_value})
{:error, %Ecto.Changeset{}}

delete_automaton_tag(automaton_tag)

Deletes a automaton_tag.

Examples

iex> delete_automaton_tag(automaton_tag)
{:ok, %AutomatonTag{}}

iex> delete_automaton_tag(automaton_tag)
{:error, %Ecto.Changeset{}}

get_automaton_tag!(id)

Gets a single automaton_tag.

Raises Ecto.NoResultsError if the Automaton tag does not exist.

Examples

iex> get_automaton_tag!(123)
%AutomatonTag{}

iex> get_automaton_tag!(456)
** (Ecto.NoResultsError)

get_tags_by_automaton_id!(id)

list_automaton_tag()

Returns the list of automaton_tag.

Examples

iex> list_automaton_tag()
[%AutomatonTag{}, ...]

update_automaton_tag(automaton_tag, attrs)

Updates a automaton_tag.

Examples

iex> update_automaton_tag(automaton_tag, %{field: new_value})
{:ok, %AutomatonTag{}}

iex> update_automaton_tag(automaton_tag, %{field: bad_value})
{:error, %Ecto.Changeset{}}