Back.Posts.PostActions (CAMI-Back v0.1.0)

View Source

The Posts.PostActions context.

Summary

Functions

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

Creates a post_actions.

Deletes a post_actions.

Gets a single post_actions.

Returns the list of posts_actions.

Functions

change_post_actions(post_actions, attrs \\ %{})

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

Examples

iex> change_post_actions(post_actions)
%Ecto.Changeset{data: %PostActions{}}

create_post_actions(attrs \\ %{})

Creates a post_actions.

Examples

iex> create_post_actions(%{field: value})
{:ok, %PostActions{}}

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

delete_post_actions(post_actions)

Deletes a post_actions.

Examples

iex> delete_post_actions(post_actions)
{:ok, %PostActions{}}

iex> delete_post_actions(post_actions)
{:error, %Ecto.Changeset{}}

get_post_actions!(id)

Gets a single post_actions.

Raises Ecto.NoResultsError if the Post actions does not exist.

Examples

iex> get_post_actions!(123)
%PostActions{}

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

list_posts_actions()

Returns the list of posts_actions.

Examples

iex> list_posts_actions()
[%PostActions{}, ...]

update_post_actions(post_actions, attrs)

Updates a post_actions.

Examples

iex> update_post_actions(post_actions, %{field: new_value})
{:ok, %PostActions{}}

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