SuperPi.Repo (super_pi v0.1.0)

Copy Markdown View Source

Unified repository facade that dispatches to SuperPi.Repo.SQLite (default single-node WAL mode) or SuperPi.Repo.Postgres (a separate PostgreSQL instance; the only store a cluster of nodes can share) based on :storage_backend configuration.

Summary

Functions

active_repo()

@spec active_repo() :: module()

all(queryable, opts \\ [])

delete(struct_or_changeset, opts \\ [])

delete_all(queryable, opts \\ [])

get(queryable, id, opts \\ [])

get!(queryable, id, opts \\ [])

get_by(queryable, clauses, opts \\ [])

insert(struct_or_changeset, opts \\ [])

insert!(struct_or_changeset, opts \\ [])

insert_all(schema_or_source, entries, opts \\ [])

one(queryable, opts \\ [])

one!(queryable, opts \\ [])

query!(sql, params \\ [], opts \\ [])

transaction(fun_or_multi, opts \\ [])

update(changeset, opts \\ [])

update!(changeset, opts \\ [])

update_all(queryable, updates, opts \\ [])