|
|
há 1 semana atrás | |
|---|---|---|
| .. | ||
| src | há 1 semana atrás | |
| tests | há 1 semana atrás | |
| Cargo.toml | há 1 semana atrás | |
| README.md | há 1 semana atrás | |
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"
| Feature | Backend | Status |
|---|---|---|
sqlite (default) |
SQLite via sqlx | Conformance tests pass |
postgres |
PostgreSQL via sqlx | Feature-flagged, needs running instance |
use kuatia_storage_sql::SqlStore;
let pool = sqlx::any::AnyPoolOptions::new()
.connect("sqlite::memory:").await?;
let store = SqlStore::new(pool);
store.migrate().await?;
Five tables: accounts, postings, transfers, transfer_accounts, sagas.
Migrations run via store.migrate().