Skip to content

Releases: baselabs/arcadic

Release list

arcadic 0.1.0

Choose a tag to compare

@corepay corepay released this 04 Jul 16:59

First public release of Arcadic — a lean, framework-agnostic Elixir client for ArcadeDB over the HTTP Cypher command API, with an optional Bolt transport for the query hot path.

Added

  • Arcadic.Conn — pure-data connection handle (redacting Inspect) and
    Arcadic.connect/3 / Arcadic.with_database/2 to build and derive handles.
  • Arcadic.query/4 + query!/4 (idempotent read endpoint) and
    Arcadic.command/4 + command!/4 (write endpoint), params-only ($name),
    Cypher-default with SQL/Gremlin/GraphQL/Mongo/SQLScript opt-in.
  • Arcadic.command_async/4 — fire-and-forget write (server enqueues, returns
    :ok on HTTP 202).
  • Session transactions: Arcadic.transaction/3 (commit on return, reraise on
    exception) and Arcadic.rollback/2 (intentional abort → {:error, reason}).
  • Arcadic.Server — server admin: create_database/2 (+ !), drop_database/2
    (+ !), database_exists?/2, list_databases/1, ready?/1.
  • Arcadic.Error / Arcadic.TransportError — typed error taxonomy with
    boundary redaction (quarantined detail, value-free reasons).
  • Arcadic.Transport — the transport behaviour seam, with the default
    Arcadic.Transport.HTTP (Req/Finch) implementation.
  • Arcadic.Telemetry — value-free :telemetry.span/3 spans (no statement,
    params, values, or database name).
  • Arcadic.Identifier — allowlist identifier validation.
  • Migration runner: Arcadic.Migration (behaviour), Arcadic.MigrationRegistry
    (use + migrations [...]), and Arcadic.Migrator (migrate/2, status/2,
    rollback/3, reset/2, pending_migrations/2), tracking applied versions in
    _arcadic_migrations.
  • Arcadic.Transport.Bolt — optional Bolt transport (Bolt v4, non-TLS scheme)
    via the optional boltx dependency; server admin remains HTTP-only.
  • Arcadic.query_stream/4 — Bolt-only lazy Stream.t() of raw row maps, chunked
    over Bolt PULL/has_more (default chunk_size: 1000); a :timeout opt bounds
    each RUN/PULL receive (default :infinity), raising
    %Arcadic.TransportError{reason: :timeout} on breach; guarded off HTTP and inside
    transactions with a typed :not_supported.
  • Arcadic.Transport.Bolt.setup/1 — single-source transport_options builder
    ([bolt: pool, bolt_opts: opts]).
  • Arcadic.Telemetry.event/3 — allowlist-validated manual telemetry for lazy ops;
    [:arcadic, :query_stream, :start | :stop] events (value-free).

Fixed

  • Arcadic.Transport.Bolt now threads conn.database into every Bolt RUN/BEGIN, so
    with_database/2 selects the database on Bolt (was hitting the connection default).
  • Bolt transaction/3 maps a commit-failure to a typed %Arcadic.Error{reason: :transaction_error} instead of leaking DBConnection's bare :rollback atom.
  • Arcadic.Transport.Bolt — a failed Bolt connect (wrong password, or a Bolt conn
    pointed at a non-Bolt port) no longer leaks a :gen_tcp socket. arcadic now owns the
    connect handshake and HELLO on both the per-stream connection and the DBConnection
    pool, closing the socket on every failure; a bad-password stream connect surfaces
    :unauthorized, and the connect HELLO is bounded by connect_timeout. Connect-time
    errors are redacted on both sites: a HELLO response arcadic's parser cannot classify
    returns a value-free :bolt_protocol_error instead of a raw exception carrying server
    bytes, and the DBConnection pool's connect error drops the server-supplied failure
    message (keeping the error code/class) so it cannot ride a connect-failure log line.