MavuSnippets.SnippetGroups (MavuSnippets v0.1.13) View Source

The Snippet_Group context.

Link to this section Summary

Link to this section Functions

Link to this function

append_content(contents, content)

View Source
Link to this function

change_snippet_group(snippet_group, attrs \\ %{})

View Source

Returns an %Ecto.Changeset{} for tracking snippet-group changes.

Examples

iex> change_snippet_group(snippet_group)
%Ecto.Changeset{data: %SnippetGroup{}}
Link to this function

create_snippet_group(attrs, conf)

View Source

Creates a snippet_group.

Examples

iex> create_snippet_group(%{field: value})
{:ok, %SnippetGroup{}}

iex> create_snippet_group(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function

delete_snippet_group(snippet_group, conf)

View Source

Deletes a snippet_group.

Examples

iex> delete_snippet_group(snippet_group)
{:ok, %SnippetGroup{}}

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

duplicate_snippet_group(snippet_group, conf)

View Source
Link to this function

get_cached_snippet_group(t1, t2)

View Source
Link to this function

get_content_list(snippet_group)

View Source
Link to this function

get_content_list(id, conf)

View Source
Link to this function

get_query(params, context)

View Source
Link to this function

get_snippet_group(id, conf)

View Source
Link to this function

get_snippet_group!(id, conf)

View Source

Gets a single snippet_group.

Raises Ecto.NoResultsError if the SnippetGroup does not exist.

Examples

iex> get_snippet_group!(123)
%SnippetGroup{}

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

list_snippet_groups(conf)

View Source

Returns the list of snippet-groups.

Examples

iex> list_snippet_groups()
[%SnippetGroup{}, ...]
Link to this function

update_snippet_group(snippet_group, attrs, conf \\ %{})

View Source

Updates a snippet_group.

Examples

iex> update_snippet_group(snippet_group, %{field: new_value}, conf)
{:ok, %SnippetGroup{}}

iex> update_snippet_group(snippet_group, %{field: bad_value}, conf)
{:error, %Ecto.Changeset{}}