Configuration module for AshScylla using direct Xandra connections.
Usage
defmodule MyApp.Repo do
use AshScylla.Repo,
otp_app: :my_app
endThen configure it in config/config.exs:
config :my_app, MyApp.Repo,
nodes: ["127.0.0.1:9042"],
keyspace: "my_app_dev"Adding to your supervision tree
children = [
MyApp.Repo,
# ...
]Options
:nodes- List of ScyllaDB/Cassandra nodes to connect to:keyspace- The keyspace to use:connect_timeout- TCP connection timeout in ms (default: 5000):disable_lwt?- Disable lightweight transactions even when resource config enables them (default: false):disable_atomic_actions?- Disable atomic action support (default: false):installed_extensions- List of installed ScyllaDB extensions (e.g.[:lwt])
Summary
Functions
Converts repo config to Xandra connection options.
Types
@type config() :: keyword()
Callbacks
@callback child_spec(keyword()) :: Supervisor.child_spec()
@callback config() :: keyword()
@callback connection() :: AshScylla.Connection.t() | nil
@callback disable_atomic_actions?() :: boolean()
@callback disable_lwt?() :: boolean()
@callback installed_extensions() :: [atom()]
@callback keyspace() :: String.t() | nil
@callback nodes() :: [String.t()]
@callback prepare( String.t(), keyword() ) :: {:ok, Xandra.Prepared.t()} | {:error, term()}
@callback prepare!( String.t(), keyword() ) :: Xandra.Prepared.t() | no_return()