# xitdb v1.0.1 - API Reference

## Modules

- [Xitdb](Xitdb.md): Idiomatic Elixir client and Odin NIF wrapper for [`xitdb`](https://github.com/xit-vcs/xitdb),
an embeddable, immutable, append-only database with persistent structural sharing.
- [Xitdb.Ash.Info](Xitdb.Ash.Info.md): Compile-time and runtime introspection helpers for `Xitdb.Ash.Resource`.

- [Xitdb.Ash.Resource](Xitdb.Ash.Resource.md): Spark DSL extension declaring Xitdb MDM collection mappings, synced field
projections, secondary B+Tree indexes, and lock actions on an `Ash.Resource`.
- [Xitdb.Ash.Transformers.WireChanges](Xitdb.Ash.Transformers.WireChanges.md): Automatically attaches the resource's configured `lock_change` (or
`Application.get_env(:xitdb, :default_lock_change)`) to `lock_action` and `unlock_action`,
and persists precompiled Xitdb projection metadata (`editable_field_strings`, `pull_fields`,
`pull_pattern`, `store`, `lock_change`, and `normalized_indexes`) onto the resource.

- [Xitdb.Ash.Tx](Xitdb.Ash.Tx.md): Provides `tx_for/3`, `tx_for/4`, `tx_for!/3`, and `tx_for!/4` macros that wrap
`Xitdb.DSL.tx` and automatically inject all `index_on` declarations configured on
one or more `Xitdb.Ash.Resource` modules.
- [Xitdb.Ash.Verifiers.VerifySyncProjection](Xitdb.Ash.Verifiers.VerifySyncProjection.md): Verifies at compile time that:
1. Every attribute accepted by `xitdb.sync_update_action` (that is not in
   `xitdb.ignored_sync_attributes`) is declared in `xitdb.editable_fields`
   or `xitdb.passthru_fields` (preventing silent field drops during Xitdb ingestion).
2. Every declared `editable_fields` / `passthru_fields` entry exists on the resource.
3. Every `indexes` key maps to a known projected or computed field.

- [Xitdb.Collection](Xitdb.Collection.md): Explicit wrapper struct for selecting a specific `xitdb` persistent collection
backing structure when writing nested data in `Xitdb.transact/3`.
- [Xitdb.Cursor](Xitdb.Cursor.md): Clojure/Datomic-style lazy cursor representing a 9-byte `Slot` (`tag` + `value`)
in an immutable `xitdb` store.
- [Xitdb.DSL](Xitdb.DSL.md): Compile-time macro DSL for `Xitdb` path selectors, transaction mutation blocks,
structural Pull patterns, and Ecto/Datomic-style Datalog queries.
- [Xitdb.Pull](Xitdb.Pull.md): Compiles structured Elixir Pull patterns into canonical `xitdb` Pull syntax strings.
- [Xitdb.Sigils](Xitdb.Sigils.md): Compile-time validated sigils for `xitdb` path selectors (`~x`) and Datalog queries (`~q`).

- Exceptions
  - [Xitdb.Error](Xitdb.Error.md): Structured exception returned or raised when a `Xitdb` operation fails.

