View Source Boruta.Ecto.Admin.Scopes (Boruta core v2.3.4)
Boruta.Ecto.Scope
resource administration
Summary
Functions
Creates a scope.
Deletes a Scope.
Gets a single scope.
Return scopes corresponding to the given ids.
Return scopes corresponding to the given names.
Returns the list of scopes.
Updates a scope.
Functions
Creates a scope.
Examples
iex> create_scope(%{field: value})
{:ok, %Scope{}}
iex> create_scope(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a Scope.
Examples
iex> delete_scope(scope)
{:ok, %Scope{}}
iex> delete_scope(scope)
{:error, %Ecto.Changeset{}}
Gets a single scope.
Raises Ecto.NoResultsError
if the Scope does not exist.
Examples
iex> get_scope!(123)
%Scope{}
iex> get_scope!(456)
** (Ecto.NoResultsError)
Return scopes corresponding to the given ids.
Examples
iex> get_scopes_by_ids(["9864decf-8aa4-4387-a7e4-19d1a059c912", "7b6ec16d-ad8f-4332-ac55-559184ec0f51"])
[%Scope{}, ...]
Return scopes corresponding to the given names.
Examples
iex> get_scopes_by_names(["first:scope", "second:scope"])
[%Scope{}, ...]
Returns the list of scopes.
Examples
iex> list_scopes()
[%Scope{}, ...]
Updates a scope.
Examples
iex> update_scope(scope, %{field: new_value})
{:ok, %Scope{}}
iex> update_scope(scope, %{field: bad_value})
{:error, %Ecto.Changeset{}}