# `Arex.Database`
[🔗](https://github.com/m/exarcade/blob/v0.1.0/lib/arex/database.ex#L1)

Database-level administrative helpers.

These functions operate on ArcadeDB databases themselves rather than records
inside a database. They are typically used in setup, provisioning, test
workflows, and lightweight operational inspection.

Reach for this module when you need to create or drop databases, check server
visibility, or collect a compact type summary for a target database.

This module stays narrow on purpose. It does not try to expose every
server-level administrative operation, only the ones that are common in test
setup, local development, and operational checks.

# `create`

Creates a database and returns `{:ok, :created}` on success.

The database name is validated before the command is sent to ArcadeDB.

# `drop`

Drops a database when it exists.

Returns `{:ok, :missing}` when the database does not exist.

# `exists?`

Returns whether the named database exists.

This checks the server-scoped existence endpoint rather than querying inside
the database.

# `list`

Lists database names visible to the configured ArcadeDB server credentials.

# `stats`

Returns a lightweight summary for the current database in `opts`.

The result includes `:type_count` and the raw type rows returned from
`schema:types`.

# `stats`

Returns a lightweight summary for the named database.

This variant injects `db: name` into the query options before loading
`schema:types`.

---

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