Cesar Rodas 8591653f6b Replace book/code with journal scoping to prepare for CRM2 integration há 1 semana atrás
..
src 8591653f6b Replace book/code with journal scoping to prepare for CRM2 integration há 1 semana atrás
tests c6ef03c386 Kuatia: append-only, auditable, multi-asset UTXO-style ledger há 1 semana atrás
Cargo.toml c6ef03c386 Kuatia: append-only, auditable, multi-asset UTXO-style ledger há 1 semana atrás
README.md c6ef03c386 Kuatia: append-only, auditable, multi-asset UTXO-style ledger há 1 semana atrás

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

Five tables: accounts, postings, transfers, transfer_accounts, sagas. Migrations run via store.migrate().