MyApp.ProdRepo (AshScylla v1.5.2)

Copy Markdown View Source

AshScylla Repo for my_app.

Manages the Xandra connection to ScyllaDB.

Summary

Functions

Returns the full repo config.

Returns the connection struct.

Creates the keyspace if it doesn't exist.

Returns whether atomic actions are disabled for this repo.

Returns whether LWT operations are disabled for this repo.

Drops the keyspace if it doesn't exist.

Returns installed ScyllaDB extensions for this repo.

Returns the configured keyspace.

Returns the configured nodes.

Prepares a CQL statement.

Prepares a CQL statement, raising on error.

Executes a CQL query.

Executes a CQL query, raising on error.

Functions

config()

@spec config() :: keyword()

Returns the full repo config.

connection()

@spec connection() :: AshScylla.Connection.t() | nil

Returns the connection struct.

create_keyspace(keyspace_name \\ nil, opts \\ [])

@spec create_keyspace(
  String.t() | nil,
  keyword()
) :: {:ok, term()} | {:error, term()}

Creates the keyspace if it doesn't exist.

disable_atomic_actions?()

@spec disable_atomic_actions?() :: boolean()

Returns whether atomic actions are disabled for this repo.

disable_lwt?()

@spec disable_lwt?() :: boolean()

Returns whether LWT operations are disabled for this repo.

drop_keyspace(keyspace_name \\ nil)

@spec drop_keyspace(String.t() | nil) :: {:ok, term()} | {:error, term()}

Drops the keyspace if it doesn't exist.

installed_extensions()

@spec installed_extensions() :: [atom()]

Returns installed ScyllaDB extensions for this repo.

keyspace()

@spec keyspace() :: String.t() | nil

Returns the configured keyspace.

nodes()

@spec nodes() :: [String.t()]

Returns the configured nodes.

prepare(cql, opts \\ [])

@spec prepare(
  String.t(),
  keyword()
) :: {:ok, Xandra.Prepared.t()} | {:error, term()}

Prepares a CQL statement.

prepare!(cql, opts \\ [])

@spec prepare!(
  String.t(),
  keyword()
) :: Xandra.Prepared.t() | no_return()

Prepares a CQL statement, raising on error.

query(cql, params, opts \\ [])

@spec query(String.t(), list(), keyword()) :: {:ok, term()} | {:error, term()}

Executes a CQL query.

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

@spec query!(String.t(), list(), keyword()) :: term() | no_return()

Executes a CQL query, raising on error.