Baz.CollectionPacks (baz v0.0.17)
Link to this section Summary
Functions
Returns an %Ecto.Changeset{}
for tracking collection_pack changes.
Creates a collection_pack.
Deletes a collection_pack.
Gets a single collection_pack.
Updates a collection_pack.
Link to this section Types
Link to this type
collection_pack()
@type collection_pack() :: Baz.CollectionPacks.CollectionPack.t()
Link to this type
filter_and_order_opts()
Link to this type
order_opt()
@type order_opt() :: {:order, [atom()]}
Link to this type
where_opt()
Link to this section Functions
Link to this function
change_collection_pack(collection_pack, attrs \\ %{})
Returns an %Ecto.Changeset{}
for tracking collection_pack changes.
examples
Examples
iex> change_collection_pack(collection_pack)
%Ecto.Changeset{data: %CollectionPack{}}
Link to this function
create_collection_pack(attrs \\ %{})
Creates a collection_pack.
examples
Examples
iex> create_collection_pack(%{field: value})
{:ok, %CollectionPack{}}
iex> create_collection_pack(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function
delete_collection_pack(collection_pack)
Deletes a collection_pack.
examples
Examples
iex> delete_collection_pack(collection_pack)
{:ok, %CollectionPack{}}
iex> delete_collection_pack(collection_pack)
{:error, %Ecto.Changeset{}}
Link to this function
filter_and_order(opts)
@spec filter_and_order(filter_and_order_opts()) :: [collection_pack()]
Link to this function
get_collection_pack!(id)
Gets a single collection_pack.
Raises Ecto.NoResultsError
if the CollectionPack does not exist.
examples
Examples
iex> get_collection_pack!(123)
%CollectionPack{}
iex> get_collection_pack!(456)
** (Ecto.NoResultsError)
Link to this function
update_collection_pack(collection_pack, attrs)
Updates a collection_pack.
examples
Examples
iex> update_collection_pack(collection_pack, %{field: new_value})
{:ok, %CollectionPack{}}
iex> update_collection_pack(collection_pack, %{field: bad_value})
{:error, %Ecto.Changeset{}}