# `MyApp.CustomRepo`
[🔗](https://github.com/ohhi-vn/ash_scylla/blob/main/lib/my_app/custom_repo.ex#L1)

AshScylla Repo for ash_scylla.

Manages the Xandra connection to ScyllaDB.

# `config`

```elixir
@spec config() :: keyword()
```

Returns the full repo config.

# `connection`

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

Returns the connection struct.

# `create_keyspace`

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

Creates the keyspace if it doesn't exist.

# `disable_atomic_actions?`

```elixir
@spec disable_atomic_actions?() :: boolean()
```

Returns whether atomic actions are disabled for this repo.

# `disable_lwt?`

```elixir
@spec disable_lwt?() :: boolean()
```

Returns whether LWT operations are disabled for this repo.

# `drop_keyspace`

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

Drops the keyspace if it doesn't exist.

# `installed_extensions`

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

Returns installed ScyllaDB extensions for this repo.

# `keyspace`

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

Returns the configured keyspace.

# `nodes`

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

Returns the configured nodes.

# `prepare`

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

Prepares a CQL statement.

# `prepare!`

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

Prepares a CQL statement, raising on error.

# `query`

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

Executes a CQL query.

# `query!`

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

Executes a CQL query, raising on error.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
