Baz.CollectionAssets (baz v0.0.6)

Link to this section Summary

Functions

Deletes a collection_asset.

Gets collection_assets that match the where clause sorted by the order clause.

Gets a single collection_asset.

Link to this section Types

Link to this type

collection_asset()

@type collection_asset() :: Baz.CollectionAssets.CollectionAsset.t()
Link to this type

filter_and_order_opts()

@type filter_and_order_opts() :: Baz.CollectionAssets.Queries.FilterAndOrder.opts()

Link to this section Functions

Link to this function

collection_asset_changeset(attrs)

@spec collection_asset_changeset(map()) :: Ecto.Changeset.t() | {:error, term()}
Link to this function

create_collection_asset(attrs)

@spec create_collection_asset(map()) :: {:ok, collection_asset()} | {:error, term()}
Link to this function

delete_collection_asset(collection_asset)

Deletes a collection_asset.

examples

Examples

iex> delete_collection_asset(collection_asset)
{:ok, %CollectionAsset{}}

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

filter_and_order(opts)

@spec filter_and_order(filter_and_order_opts()) :: [collection_asset()]

Gets collection_assets that match the where clause sorted by the order clause.

examples

Examples

iex> filter_and_order(where: [venue: "open_sea"], order: [desc: :venue])
[%CollectionAsset{}]
Link to this function

get_collection_asset!(id)

@spec get_collection_asset!(term()) :: term()

Gets a single collection_asset.

Raises Ecto.NoResultsError if the Collection does not exist.

examples

Examples

iex> get_collection_asset!(123)
%CollectionAsset{}

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