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, request_timeout: pos_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; max wait per received CHUNK).:request_timeout— default per-call whole-response timeout (ms). Bounds the full response, defeating a peer that trickles chunks forever;nil(the default) leaves Finch's own default (:infinity) in place.: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.
A base_url carrying USERINFO (e.g. http://user:pass@host) together with an explicit
:auth raises — the HTTP layer resolves that conflict silently (the URL credentials win
over the header), which would defeat a caller deliberately overriding credentials.
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.