Cesar Rodas e0b8bbffd2 Add accounting-mapping doc and ignore .DS_Store hai 1 mes
..
src dd4228aae1 Rename Journal to Book and extract BookPolicy hai 1 mes
tests 40fd99e598 Kuatia: append-only, auditable, multi-asset UTXO-style ledger hai 1 mes
Cargo.toml e0b8bbffd2 Add accounting-mapping doc and ignore .DS_Store hai 1 mes
README.md e0b8bbffd2 Add accounting-mapping doc and ignore .DS_Store hai 1 mes

README.md

kuatia-storage-sql

SQL-backed Store implementation for the kuatia ledger.

Uses sqlx::Any for database-agnostic queries. Enable features to select the backend:

[dependencies]
kuatia-storage-sql = { features = ["sqlite"] }   # or "postgres"

Backends

Feature Backend Status
sqlite (default) SQLite via sqlx Conformance tests pass
postgres PostgreSQL via sqlx Feature-flagged, needs running instance

Usage

use kuatia_storage_sql::SqlStore;

let pool = sqlx::any::AnyPoolOptions::new()
    .connect("sqlite::memory:").await?;
let store = SqlStore::new(pool);
store.migrate().await?;

Schema

Tables: accounts, postings, transfers, transfer_accounts, sagas, events, books. Migrations run via store.migrate().