Back.Comments (CAMI-Back v0.1.0)
View SourceThe Comments context.
Summary
Functions
Returns an %Ecto.Changeset{} for tracking comment changes.
Creates a comment.
Deletes a comment.
Gets a single comment.
Returns the list of comment.
Updates a comment.
Functions
Returns an %Ecto.Changeset{} for tracking comment changes.
Examples
iex> change_comment(comment)
%Ecto.Changeset{data: %Comment{}}
Creates a comment.
Examples
iex> create_comment(%{field: value})
{:ok, %Comment{}}
iex> create_comment(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a comment.
Examples
iex> delete_comment(comment)
{:ok, %Comment{}}
iex> delete_comment(comment)
{:error, %Ecto.Changeset{}}
Gets a single comment.
Raises Ecto.NoResultsError if the Comment does not exist.
Examples
iex> get_comment!(123)
%Comment{}
iex> get_comment!(456)
** (Ecto.NoResultsError)
Returns the list of comment.
Examples
iex> list_comment()
[%Comment{}, ...]
Updates a comment.
Examples
iex> update_comment(comment, %{field: new_value})
{:ok, %Comment{}}
iex> update_comment(comment, %{field: bad_value})
{:error, %Ecto.Changeset{}}