# `Arcadic.Export`
[🔗](https://github.com/baselabs/arcadic/blob/baselabs_arcadic-v4.0.1/lib/arcadic/export.ex#L5)

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;
rejected inputs are omitted from diagnostics. 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`.

# `database`

```elixir
@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!`

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

Exports `conn.database`, returning the rows or raising.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
