# drink_me_alice v0.1.0 - API Reference

## Modules

- [DrinkMeAlice](DrinkMeAlice.md): A bounded SurrealDB client for Elixir, qualified against SurrealDB
3.0.5 (see the README's Compatibility section for the version policy
and the cleartext-transport deployment boundary).
- [DrinkMeAlice.Admin](DrinkMeAlice.Admin.md): Short-lived administrative work under the root identity: provisioning
(namespace, database, the database-scoped runtime user) and schema
migrations. Never pooled, never a process — each call opens its own
`DrinkMeAlice.Session`, runs, and closes.
- [DrinkMeAlice.Ash.Codec](DrinkMeAlice.Ash.Codec.md): Attribute ↔ SurrealDB value mapping for the Ash data layer, keyed on
`Ash.Type.storage_type/2`.
- [DrinkMeAlice.Ash.DataLayer](DrinkMeAlice.Ash.DataLayer.md): An Ash data layer over a supervised `DrinkMeAlice.Conn`.
- [DrinkMeAlice.Ash.Filter](DrinkMeAlice.Ash.Filter.md): Translate an Ash filter into a parameterized SurrealQL `WHERE` clause.
- [DrinkMeAlice.Ash.Schema](DrinkMeAlice.Ash.Schema.md): SurrealQL DDL for resources using `DrinkMeAlice.Ash.DataLayer`,
shaped as `DrinkMeAlice.Migrations` migrations.
- [DrinkMeAlice.Conn](DrinkMeAlice.Conn.md): The single supervised connection owner: one Mint/MintWebSocket
connection, one outstanding RPC at a time, bounded admission via
`DrinkMeAlice.Credits` *before* any mailbox send.
- [DrinkMeAlice.Credits](DrinkMeAlice.Credits.md): The 32-credit RPC admission bound — a fixed slot table whose rows also
hold the bounded request payload.
- [DrinkMeAlice.Error](DrinkMeAlice.Error.md): A typed error: a stable `code` string and a bounded `detail` term.
- [DrinkMeAlice.FrameGuard](DrinkMeAlice.FrameGuard.md): Bounded WebSocket framing guard — production adaptation of the accepted
BF-02A `SurrealTransport.FrameGuard`.
- [DrinkMeAlice.Graph](DrinkMeAlice.Graph.md): Graph edges between records — SurrealDB's `RELATE` — with the same
honest write outcomes as `DrinkMeAlice.Tx`.
- [DrinkMeAlice.Json](DrinkMeAlice.Json.md): Bounded decoder/encoder boundary for SurrealDB JSON-RPC payloads.
- [DrinkMeAlice.Migrations](DrinkMeAlice.Migrations.md): A checksummed, locked, versioned migration runner; the migration list
is supplied by the caller.
- [DrinkMeAlice.Outcome](DrinkMeAlice.Outcome.md): Classifies raw SurrealDB replies for possibly-submitted mutations and
reads into *facts*.
- [DrinkMeAlice.Session](DrinkMeAlice.Session.md): A caller-owned, synchronous SurrealDB session: one socket, owned by the
process that opened it, one request at a time, no background process.
- [DrinkMeAlice.TestServer](DrinkMeAlice.TestServer.md): Owned, private, loopback-only SurrealDB server child — for tests of
this library and of anything built on it.
- [DrinkMeAlice.Tx](DrinkMeAlice.Tx.md): Transaction scripts with a classifier-ready shape, and the one write
path that maps transport facts plus the reply into a write outcome.
- [DrinkMeAlice.Ws](DrinkMeAlice.Ws.md): Passive, bounded WebSocket transport over Mint 1.10.1 /
mint_web_socket 1.0.6 — production adaptation of the accepted BF-02A
`SurrealTransport.Ws` probe.

- Exceptions
  - [DrinkMeAlice.Ash.OutcomeUnknown](DrinkMeAlice.Ash.OutcomeUnknown.md): A write that may or may not have committed: the request reached the
wire but no classifiable reply came back (lost reply, timeout,
inconclusive reply shape). This is NOT a failure — reconcile by
reading the record, or by retrying the identical write (creates are
idempotent on the primary key: a replayed create that already landed
is refused as "already taken", which proves it committed).

  - [DrinkMeAlice.Ash.QueryFailed](DrinkMeAlice.Ash.QueryFailed.md): A read or write the store rejected, or a bound this data layer enforces.
  - [DrinkMeAlice.Ash.Unavailable](DrinkMeAlice.Ash.Unavailable.md): The store refused before the request was sent (credit bound,
connection down, deadline passed while queued, session refused,
clock uncertainty) — certified not submitted, safe to retry.

