Baz.CollectionImports (baz v0.0.6)

Link to this section Summary

Functions

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

Deletes a collection_import.

Gets a single collection_import.

Link to this section Types

Link to this type

collection_import()

@type collection_import() :: Baz.CollectionImports.CollectionImport.t()
Link to this type

create_attrs()

Link to this type

filter_and_order_opts()

@type filter_and_order_opts() :: [where_opt() | order_opt()]
@type order_opt() :: {:order, [atom()]}
@type where_opt() :: {:where, [{atom(), term()}]}

Link to this section Functions

Link to this function

change_collection_import(collection_import, attrs \\ %{})

@spec change_collection_import(collection_import(), map()) :: Ecto.Changeset.t()

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

examples

Examples

iex> change_collection_import(collection_import)
%Ecto.Changeset{data: %CollectionImport{}}
Link to this function

create_collection_import(attrs)

@spec create_collection_import(create_attrs()) ::
  {:ok, collection_import()}
  | {:error,
     Baz.CollectionImports.Services.CreateCollectionImport.error_reason()}
Link to this function

delete_collection_import(collection_import)

Deletes a collection_import.

examples

Examples

iex> delete_collection_import(collection_import)
{:ok, %CollectionImport{}}

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

filter_and_order(opts)

@spec filter_and_order(filter_and_order_opts()) :: [collection_import()]
Link to this function

get_collection_import!(id)

@spec get_collection_import!(term()) :: term()

Gets a single collection_import.

Raises Ecto.NoResultsError if the CollectionImport does not exist.

examples

Examples

iex> get_collection_import!(123)
%CollectionImport{}

iex> get_collection_import!(456)
** (Ecto.NoResultsError)
Link to this function

update_collection_import(collection_import, attrs)

@spec update_collection_import(collection_import(), map()) ::
  {:ok, collection_import()} | {:error, Ecto.Changeset.t()}

Updates a collection_import.

examples

Examples

iex> update_collection_import(collection_import, %{field: new_value})
{:ok, %CollectionImport{}}

iex> update_collection_import(collection_import, %{field: bad_value})
{:error, %Ecto.Changeset{}}