Mirage.Lists (mirage v0.76.0)

The Lists context.

Link to this section Summary

Functions

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

Creates a list.

Deletes a list.

Gets a single list.

Returns the list of lists.

Publishes a note by setting published_at to utc_now

Unpublishes a not by setting published_at to nil

Updates a list.

Link to this section Functions

Link to this function

change_list(list, attrs \\ %{})

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

Examples

iex> change_list(list)
%Ecto.Changeset{data: %List{}}
Link to this function

create_list(attrs \\ %{})

Creates a list.

Examples

iex> create_list(%{field: value})
{:ok, %List{}}

iex> create_list(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function

delete_list(list)

Deletes a list.

Examples

iex> delete_list(list)
{:ok, %List{}}

iex> delete_list(list)
{:error, %Ecto.Changeset{}}
Link to this function

for_select(list)

Link to this function

get_list!(slug)

Gets a single list.

Raises Ecto.NoResultsError if the List does not exist.

Examples

iex> get_list!(123)
%List{}

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

Returns the list of lists.

Examples

iex> list_lists()
[%List{}, ...]
Link to this function

preload_list(list)

Link to this function

publish_list(list)

Publishes a note by setting published_at to utc_now

Examples

iex> publish_list(list)
{:ok, %list{}}
Link to this function

unpublish_list(list)

Unpublishes a not by setting published_at to nil

Examples

iex> publish_list(list)
{:ok, %list{}}
Link to this function

update_list(list, attrs)

Updates a list.

Examples

iex> update_list(list, %{field: new_value})
{:ok, %List{}}

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