Op.Base (op v0.1.0)

The Base context.

Summary

Functions

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

Creates a queri.

Deletes a queri.

Gets a single queri.

Returns the list of queries.

Updates a queri.

Functions

Link to this function

change_queri(queri, attrs \\ %{})

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

Examples

iex> change_queri(queri)
%Ecto.Changeset{data: %Queri{}}
Link to this function

create_queri(attrs \\ %{})

Creates a queri.

Examples

iex> create_queri(%{field: value})
{:ok, %Queri{}}

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

delete_queri(queri)

Deletes a queri.

Examples

iex> delete_queri(queri)
{:ok, %Queri{}}

iex> delete_queri(queri)
{:error, %Ecto.Changeset{}}

Gets a single queri.

Raises Ecto.NoResultsError if the Queri does not exist.

Examples

iex> get_queri!(123)
%Queri{}

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

Returns the list of queries.

Examples

iex> list_queries()
[%Queri{}, ...]
Link to this function

update_queri(queri, attrs)

Updates a queri.

Examples

iex> update_queri(queri, %{field: new_value})
{:ok, %Queri{}}

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