Connection handle for ArcadeDB — pure data, no process.
HTTP has no per-connection state; Finch owns the socket pool and the ArcadeDB
session (when inside a transaction) rides session_id. Build one with
Arcadic.connect/3; derive a same-pool handle on another database with
with_database/2.
Summary
Functions
Build a connection handle.
Derive a Bearer-auth handle from a Basic one (typically after Arcadic.Security.login/1).
Derive a handle with a read-consistency level; validates and clears the session. HTTP-only.
Derive a same-pool handle on another database; validates and clears the session.
Types
@type consistency() :: :eventual | :read_your_writes | :linearizable
@type t() :: %Arcadic.Conn{ auth: {String.t(), String.t()} | {:bearer, String.t()}, base_url: String.t(), consistency: consistency(), database: String.t(), hosts: [String.t()], read_after: integer() | nil, session_id: String.t() | nil, timeout: pos_integer() | nil, transport: module(), transport_options: keyword() }
Functions
Build a connection handle.
Options
:auth—{user, pass}. REQUIRED (no default credential).:transport— transport module (defaultArcadic.Transport.HTTP).:transport_options— keyword passed to the transport (:finch,:plug,:timeout, pool knobs).:timeout— default per-call receive timeout (ms).:consistency- read-consistency level::eventual(default) |:read_your_writes|:linearizable. HTTP-only; a non-default level on a Bolt conn raises.:hosts- additionalhttp(s)base URLs for multi-host availability failover (default[]). HTTP-only; a non-empty list on a Bolt conn raises.
Examples
iex> Arcadic.connect("http://localhost:2480", "mydb", auth: {"root", "x"}).database
"mydb"
Derive a Bearer-auth handle from a Basic one (typically after Arcadic.Security.login/1).
@spec with_consistency(t(), consistency()) :: t()
Derive a handle with a read-consistency level; validates and clears the session. HTTP-only.
Derive a same-pool handle on another database; validates and clears the session.