Integrate.Claims (IntegrateDB v0.1.0) View Source
The Claims context.
Link to this section Summary
Functions
Returns an %Ecto.Changeset{}
for tracking claim changes.
Returns an %Ecto.Changeset{}
for tracking claim changes.
Returns an %Ecto.Changeset{}
for tracking column changes.
Returns an %Ecto.Changeset{}
for tracking column_alternative changes.
Creates a claim.
Creates a claim alternative.
Creates a column.
Creates a column_alternative.
Deletes a claim.
Deletes a claim alternative.
Deletes a column.
Deletes a column_alternative.
Gets the associated claims for a spec, preloaded with their child associations.
Gets a single claim.
Gets a single claim alternative.
Gets a single column.
Gets a single column_alternative.
Initialises a claim_alternative
and its child columns
at the same time.
Initialises a claim
with its alternatives
.
Initialise a column_alternative.
Initialise a column.
Returns the list of claim alternatives.
Returns the list of claims.
Returns the list of column_alternatives.
Returns the list of columns.
Coerce a list of claims to a {schema, table}: column_names
map.
Updates a claim.
Updates a claim alternative.
Updates a column.
Updates a column_alternative.
Link to this section Functions
Returns an %Ecto.Changeset{}
for tracking claim changes.
Examples
iex> change_claim(claim)
%Ecto.Changeset{data: %Claim{}}
Returns an %Ecto.Changeset{}
for tracking claim changes.
Examples
iex> change_claim(claim)
%Ecto.Changeset{data: %ClaimAlternative{}}
Returns an %Ecto.Changeset{}
for tracking column changes.
Examples
iex> change_column(column)
%Ecto.Changeset{data: %Column{}}
Returns an %Ecto.Changeset{}
for tracking column_alternative changes.
Examples
iex> change_column_alternative(column_alternative)
%Ecto.Changeset{data: %ColumnAlternative{}}
Creates a claim.
Examples
iex> create_claim(%Spec{} = spec, %{field: value})
{:ok, %Claim{}}
iex> create_claim(%Spec{} = spec, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a claim alternative.
Examples
iex> create_claim_alternative(%Claim{}, %{field: value})
{:ok, %ClaimAlternative{}}
iex> create_claim_alternative(%Claim{}, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a column.
Examples
iex> create_column(%Claim{} = claim, %{field: value})
{:ok, %Column{}}
iex> create_column(%Claim{} = claim, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a column_alternative.
Examples
iex> create_column_alternative(%Column{} = column, %{field: value})
{:ok, %ColumnAlternative{}}
iex> create_column_alternative(%Column{} = column, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a claim.
Examples
iex> delete_claim(claim)
{:ok, %Claim{}}
iex> delete_claim(claim)
{:error, %Ecto.Changeset{}}
Deletes a claim alternative.
Examples
iex> delete_claim_alternative(claim)
{:ok, %ClaimAlternative{}}
iex> delete_claim_alternative(claim)
{:error, %Ecto.Changeset{}}
Deletes a column.
Examples
iex> delete_column(column)
{:ok, %Column{}}
iex> delete_column(column)
{:error, %Ecto.Changeset{}}
Deletes a column_alternative.
Examples
iex> delete_column_alternative(column_alternative)
{:ok, %ColumnAlternative{}}
iex> delete_column_alternative(column_alternative)
{:error, %Ecto.Changeset{}}
Gets the associated claims for a spec, preloaded with their child associations.
Examples
iex> get_by_spec(%Spec{})
[%Claim{}, ...]
Gets a single claim.
Raises Ecto.NoResultsError
if the Claim does not exist.
Examples
iex> get_claim!(123)
%Claim{}
iex> get_claim!(456)
** (Ecto.NoResultsError)
Gets a single claim alternative.
Raises Ecto.NoResultsError
if the ClaimAlternative does not exist.
Examples
iex> get_claim_alternative!(123)
%ClaimAlternative{}
iex> get_claim_alternative!(456)
** (Ecto.NoResultsError)
Gets a single column.
Raises Ecto.NoResultsError
if the Column does not exist.
Examples
iex> get_column!(123)
%Column{}
iex> get_column!(456)
** (Ecto.NoResultsError)
Gets a single column_alternative.
Raises Ecto.NoResultsError
if the ColumnAlternative does not exist.
Examples
iex> get_column_alternative!(123)
%ColumnAlternative{}
iex> get_column_alternative!(456)
** (Ecto.NoResultsError)
Initialises a claim_alternative
and its child columns
at the same time.
Returns a changeset.
Examples
iex> init_claim_alternative_with_columns([%Column{}], %{field: value})
%Ecto.Changeset{}
iex> init_claim_alternative_with_columns(%Claim{}, [%Column{}], %{field: value})
%Ecto.Changeset{}
Initialises a claim
with its alternatives
.
Returns a changeset.
Examples
iex> init_claim_with_alternatives([%ClaimAlternative{}])
%Ecto.Changeset{}
Initialise a column_alternative.
Examples
iex> init_column_alternative(%{field: value})
%Ecto.Changeset{}
Initialise a column.
Examples
iex> init_column_with_alternatives([%ColumnAlternative{}])
%Ecto.Changeset{}
Returns the list of claim alternatives.
Examples
iex> list_claim_alternatives()
[%ClaimAlternative{}, ...]
Returns the list of claims.
Examples
iex> list_claims()
[%Claim{}, ...]
Returns the list of column_alternatives.
Examples
iex> list_column_alternatives()
[%ColumnAlternative{}, ...]
Returns the list of columns.
Examples
iex> list_columns()
[%Column{}, ...]
Coerce a list of claims to a {schema, table}: column_names
map.
Examples
iex> to_columns_map([%Claim{}])
%{{schema, table}: [column_name, ...], ...}
Updates a claim.
Examples
iex> update_claim(claim, %{field: new_value})
{:ok, %Claim{}}
iex> update_claim(claim, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a claim alternative.
Examples
iex> update_claim_alternative(claim, %{field: new_value})
{:ok, %ClaimAlternative{}}
iex> update_claim_alternative(claim, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a column.
Examples
iex> update_column(column, %{field: new_value})
{:ok, %Column{}}
iex> update_column(column, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a column_alternative.
Examples
iex> update_column_alternative(column_alternative, %{field: new_value})
{:ok, %ColumnAlternative{}}
iex> update_column_alternative(column_alternative, %{field: bad_value})
{:error, %Ecto.Changeset{}}