Baz.CollectionEvents (baz v0.0.6)

Link to this section Summary

Functions

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

Deletes a collection_event.

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

Gets a single collection_event.

Link to this section Types

Link to this type

collection_event()

@type collection_event() :: Baz.CollectionEvents.CollectionEvent.t()
Link to this type

filter_and_order_opts()

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

Link to this section Functions

Link to this function

collection_event_changeset(attrs)

@spec collection_event_changeset(map()) :: Ecto.Changeset.t() | {:error, term()}

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

examples

Examples

iex> collection_event_changeset(%{})
%CollectionEvent{}
Link to this function

create_collection_event(attrs)

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

delete_collection_event(collection_event)

Deletes a collection_event.

examples

Examples

iex> delete_collection_event(collection_event)
{:ok, %CollectionEvent{}}

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

filter_and_order(opts)

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

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

examples

Examples

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

get_collection_event!(id)

@spec get_collection_event!(non_neg_integer()) :: collection_event()

Gets a single collection_event.

Raises Ecto.NoResultsError if the CollectionEvent does not exist.

examples

Examples

iex> get_collection_event!("open_sea")
%CollectionEvent{}

iex> get_collection_event!("open_zea")
** (Ecto.NoResultsError)