Arcadic.Export (Arcadic v0.4.0)

Copy Markdown View Source

Server-side database export over ArcadeDB's EXPORT DATABASE file://<name> command (symmetric to Arcadic.Import). The target is a bare <name> written to the server's configured exports directory — a path/traversal character is rejected value-free (ArcadeDB itself rejects a directory in the target: "Export file cannot contain path change"). with: settings (e.g. format: "jsonl", overwrite: true) reuse Arcadic.Import's no-parens grammar: names Arcadic.Identifier-validated, values number/boolean/string (string values charset-allowlisted, injection-inert). Tenant-blind; every rejection is value-free (never echoes the name/value — AGENTS.md Rule 3). The success row (operation/toUrl/totalRecords/…) is top-level-@props-stripped by Result.normalize (a shallow Map.drop per row — correct because the export row is flat) via command/4.

Summary

Functions

Exports conn.database to file://<name> server-side. Returns {:ok, rows} (rows carry operation/toUrl/totalRecords/documents/vertices/result) or {:error, Arcadic.Error.t() | Arcadic.TransportError.t()}.

Exports conn.database, returning the rows or raising.

Functions

database(conn, name, opts \\ [])

@spec database(Arcadic.Conn.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Exception.t()}

Exports conn.database to file://<name> server-side. Returns {:ok, rows} (rows carry operation/toUrl/totalRecords/documents/vertices/result) or {:error, Arcadic.Error.t() | Arcadic.TransportError.t()}.

opts: with — a keyword list of export settings (format:, overwrite:, …), same rules as Arcadic.Import. Raises ArgumentError (value-free) on a bad name or with: entry.

database!(conn, name, opts \\ [])

@spec database!(Arcadic.Conn.t(), String.t(), keyword()) :: [map()]

Exports conn.database, returning the rows or raising.