Baz.CollectionEventImports (baz v0.0.16)
Link to this section Summary
Functions
Returns an %Ecto.Changeset{}
for tracking collection_event_import changes.
Returns a %CollectionEventImport{}
initialized with a week before today date range
Deletes a collection_event_import.
Gets collection_assets that match the where clause sorted by the order clause.
Gets a single collection_event_import.
Updates a collection_event_import.
Link to this section Types
collection_event_import()
@type collection_event_import() :: Baz.CollectionEventImports.CollectionEventImport.t()
create_attrs()
@type create_attrs() :: Baz.CollectionEventImports.Services.CreateCollectionEventImport.attrs()
filter_and_order_opts()
@type filter_and_order_opts() :: Baz.CollectionEventImports.Queries.FilterAndOrder.opts()
Link to this section Functions
change_collection_event_import(collection_event_import, attrs \\ %{})
@spec change_collection_event_import(collection_event_import(), map()) :: Ecto.Changeset.t()
Returns an %Ecto.Changeset{}
for tracking collection_event_import changes.
examples
Examples
iex> change_collection_event_import(collection_event_import)
%Ecto.Changeset{data: %CollectionEventImport{}}
collection_event_import_today(params)
@spec collection_event_import_today(map()) :: collection_event_import()
Returns a %CollectionEventImport{}
initialized with a week before today date range
examples
Examples
iex> collection_event_import_today(%{})
%CollectionEventImport{}
create_collection_event_import(attrs)
@spec create_collection_event_import(create_attrs()) :: {:ok, collection_event_import()} | {:error, Baz.CollectionEventImports.Services.CreateCollectionEventImport.error_reason()}
delete_collection_event_import(collection_event_import)
Deletes a collection_event_import.
examples
Examples
iex> delete_collection_event_import(collection_event_import)
{:ok, %CollectionEventImport{}}
iex> delete_collection_event_import(collection_event_import)
{:error, %Ecto.Changeset{}}
filter_and_order(opts)
@spec filter_and_order(filter_and_order_opts()) :: [collection_event_import()]
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])
[%CollectionEventImport{}]
get_collection_event_import!(id)
@spec get_collection_event_import!(non_neg_integer()) :: collection_event_import()
Gets a single collection_event_import.
Raises Ecto.NoResultsError
if the CollectionEventImport does not exist.
examples
Examples
iex> get_collection_event_import!("open_sea")
%CollectionEventImport{}
iex> get_collection_event_import!("open_zea")
** (Ecto.NoResultsError)
update_collection_event_import(collection_event_import, attrs)
@spec update_collection_event_import(collection_event_import(), map()) :: {:ok, collection_event_import()} | {:error, Ecto.Changeset.t()}
Updates a collection_event_import.
examples
Examples
iex> update_collection_event_import(collection_event_import, %{field: new_value})
{:ok, %CollectionEventImport{}}
iex> update_collection_event_import(collection_event_import, %{field: bad_value})
{:error, %Ecto.Changeset{}}