The Master context.
Summary
Functions
Returns an %Ecto.Changeset{} for tracking creator changes.
Returns an %Ecto.Changeset{} for tracking frequency changes.
Returns an %Ecto.Changeset{} for tracking locations changes.
Returns an %Ecto.Changeset{} for tracking member_type changes.
Returns an %Ecto.Changeset{} for tracking places changes.
Returns an %Ecto.Changeset{} for tracking publishers changes.
Returns an %Ecto.Changeset{} for tracking topic changes.
Creates a creator.
Creates a frequency.
Creates a locations.
Creates a member_type.
Creates a places.
Creates a publishers.
Creates a topic.
Deletes a creator.
Deletes a frequency.
Deletes a locations.
Deletes a member_type.
Deletes a places.
Deletes a publishers.
Deletes a topic.
Gets a single creator.
Gets a single frequency.
Gets a single locations.
Gets a single member_type.
Gets a single member_type by slug.
Gets or creates a creator by attributes (typically creator_name). Uses upsert with on_conflict to handle race conditions.
Gets a single places.
Gets a single publishers.
Gets a single topic.
Returns the list of locations with filtering options.
Returns the list of mst_creator.
Return the list of mst_creator with the given filter.
Return the list of mst_creator with pagination.
Returns the list of mst_frequency.
Returns the list of mst_frequency with pagination.
Returns the list of mst_locations.
Returns the list of mst_locations with pagination.
Returns the list of mst_member_types.
Returns the list of mst_places.
Returns the list of mst_places with pagination.
Returns the list of mst_publishers.
Returns the list of mst_publisher with pagination
Returns the list of mst_topics.
Returns the list of mst_topics with pagination.
Search creators by name using a case-insensitive partial match.
Search creators but return only minimal fields (id, creator_name, affiliation) to reduce data transfer.
Updates a creator.
Updates a frequency.
Updates a locations.
Updates a member_type.
Updates a places.
Updates a publishers.
Updates a topic.
Functions
Returns an %Ecto.Changeset{} for tracking creator changes.
Examples
iex> change_creator(creator)
%Ecto.Changeset{data: %Creator{}}
Returns an %Ecto.Changeset{} for tracking frequency changes.
Examples
iex> change_frequency(frequency)
%Ecto.Changeset{data: %Frequency{}}
Returns an %Ecto.Changeset{} for tracking locations changes.
Examples
iex> change_locations(locations)
%Ecto.Changeset{data: %Locations{}}
Returns an %Ecto.Changeset{} for tracking member_type changes.
Examples
iex> change_member_type(member_type)
%Ecto.Changeset{data: %MemberType{}}
Returns an %Ecto.Changeset{} for tracking places changes.
Examples
iex> change_places(places)
%Ecto.Changeset{data: %Places{}}
Returns an %Ecto.Changeset{} for tracking publishers changes.
Examples
iex> change_publishers(publishers)
%Ecto.Changeset{data: %Publishers{}}
Returns an %Ecto.Changeset{} for tracking topic changes.
Examples
iex> change_topic(topic)
%Ecto.Changeset{data: %Topic{}}
Creates a creator.
Examples
iex> create_creator(%{creator_name: "John Doe"})
{:ok, %Creator{}}
Creates a frequency.
Examples
iex> create_frequency(%{field: value})
{:ok, %Frequency{}}
iex> create_frequency(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a locations.
Examples
iex> create_locations(%{field: value})
{:ok, %Locations{}}
iex> create_locations(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a member_type.
Examples
iex> create_member_type(%{field: value})
{:ok, %MemberType{}}
iex> create_member_type(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a places.
Examples
iex> create_places(%{field: value})
{:ok, %Places{}}
iex> create_places(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a publishers.
Examples
iex> create_publishers(%{field: value})
{:ok, %Publishers{}}
iex> create_publishers(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a topic.
Examples
iex> create_topic(%{field: value})
{:ok, %Topic{}}
iex> create_topic(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a creator.
Examples
iex> delete_creator(creator)
{:ok, %Creator{}}
iex> delete_creator(creator)
{:error, %Ecto.Changeset{}}
Deletes a frequency.
Examples
iex> delete_frequency(frequency)
{:ok, %Frequency{}}
iex> delete_frequency(frequency)
{:error, %Ecto.Changeset{}}
Deletes a locations.
Examples
iex> delete_locations(locations)
{:ok, %Locations{}}
iex> delete_locations(locations)
{:error, %Ecto.Changeset{}}
Deletes a member_type.
Examples
iex> delete_member_type(member_type)
{:ok, %MemberType{}}
iex> delete_member_type(member_type)
{:error, %Ecto.Changeset{}}
Deletes a places.
Examples
iex> delete_places(places)
{:ok, %Places{}}
iex> delete_places(places)
{:error, %Ecto.Changeset{}}
Deletes a publishers.
Examples
iex> delete_publishers(publishers)
{:ok, %Publishers{}}
iex> delete_publishers(publishers)
{:error, %Ecto.Changeset{}}
Deletes a topic.
Examples
iex> delete_topic(topic)
{:ok, %Topic{}}
iex> delete_topic(topic)
{:error, %Ecto.Changeset{}}
Gets a single creator.
Raises Ecto.NoResultsError if the Creator does not exist.
Examples
iex> get_creator!(123)
%Creator{}
iex> get_creator!(456)
** (Ecto.NoResultsError)
Gets a single frequency.
Raises Ecto.NoResultsError if the Frequency does not exist.
Examples
iex> get_frequency!(123)
%Frequency{}
iex> get_frequency!(456)
** (Ecto.NoResultsError)
Gets a single locations.
Raises Ecto.NoResultsError if the Locations does not exist.
Examples
iex> get_locations!(123)
%Locations{}
iex> get_locations!(456)
** (Ecto.NoResultsError)
Gets a single member_type.
Raises Ecto.NoResultsError if the Member type does not exist.
Examples
iex> get_member_type!(123)
%MemberType{}
iex> get_member_type!(456)
** (Ecto.NoResultsError)
Gets a single member_type by slug.
Returns nil if the Member type does not exist.
Examples
iex> get_member_type_by_slug("verified_member")
%MemberType{}
iex> get_member_type_by_slug("nonexistent")
nil
Gets or creates a creator by attributes (typically creator_name). Uses upsert with on_conflict to handle race conditions.
Examples
iex> get_or_create_creator(%{creator_name: "John Doe"})
{:ok, %Creator{}}
Gets a single places.
Raises Ecto.NoResultsError if the Places does not exist.
Examples
iex> get_places!(123)
%Places{}
iex> get_places!(456)
** (Ecto.NoResultsError)
Gets a single publishers.
Raises Ecto.NoResultsError if the Publishers does not exist.
Examples
iex> get_publishers!(123)
%Publishers{}
iex> get_publishers!(456)
** (Ecto.NoResultsError)
Gets a single topic.
Raises Ecto.NoResultsError if the Topic does not exist.
Examples
iex> get_topic!(123)
%Topic{}
iex> get_topic!(456)
** (Ecto.NoResultsError)
Returns the list of locations with filtering options.
Options
:node_id- Filter by node_id:is_active- Filter by active status:preload- List of associations to preload
Examples
iex> list_locations(node_id: 1)
[%Location{}, ...]
iex> list_locations(node_id: 1, is_active: true)
[%Location{}, ...]
Returns the list of mst_creator.
Examples
iex> list_mst_creator()
[%Creator{}, ...]
Return the list of mst_creator with the given filter.
Examples
iex> list_mst_creator(%{field: value})
[%Creator{}, ...]
Return the list of mst_creator with pagination.
Returns the list of mst_frequency.
Examples
iex> list_mst_frequency()
[%Frequency{}, ...]
Returns the list of mst_frequency with pagination.
Examples
iex> list_mst_frequency_paginated(1, 10)
{[%Frequency{}], 3}
Returns the list of mst_locations.
Examples
iex> list_mst_locations()
[%Locations{}, ...]
Returns the list of mst_locations with pagination.
Returns the list of mst_member_types.
Examples
iex> list_mst_member_types()
[%MemberType{}, ...]
Returns the list of mst_places.
Examples
iex> list_mst_places()
[%Places{}, ...]
Returns the list of mst_places with pagination.
Returns the list of mst_publishers.
Examples
iex> list_mst_publishers()
[%Publishers{}, ...]
Returns the list of mst_publisher with pagination
Returns the list of mst_topics.
Examples
iex> list_mst_topics()
[%Topic{}, ...]
Returns the list of mst_topics with pagination.
Search creators by name using a case-insensitive partial match.
Returns a list limited by limit.
Search creators but return only minimal fields (id, creator_name, affiliation) to reduce data transfer.
Updates a creator.
Examples
iex> update_creator(creator, %{field: new_value})
{:ok, %Creator{}}
iex> update_creator(creator, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a frequency.
Examples
iex> update_frequency(frequency, %{field: new_value})
{:ok, %Frequency{}}
iex> update_frequency(frequency, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a locations.
Examples
iex> update_locations(locations, %{field: new_value})
{:ok, %Locations{}}
iex> update_locations(locations, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a member_type.
Examples
iex> update_member_type(member_type, %{field: new_value})
{:ok, %MemberType{}}
iex> update_member_type(member_type, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a places.
Examples
iex> update_places(places, %{field: new_value})
{:ok, %Places{}}
iex> update_places(places, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a publishers.
Examples
iex> update_publishers(publishers, %{field: new_value})
{:ok, %Publishers{}}
iex> update_publishers(publishers, %{field: bad_value})
{:error, %Ecto.Changeset{}}
Updates a topic.
Examples
iex> update_topic(topic, %{field: new_value})
{:ok, %Topic{}}
iex> update_topic(topic, %{field: bad_value})
{:error, %Ecto.Changeset{}}