jacs-postgresql
PostgreSQL storage backend for JACS documents.
Install
Quick Start
use PostgresStorage;
use StorageDocumentTraits;
use DatabaseDocumentTraits;
let storage = new?;
storage.run_migrations?;
Design
- Dual-column storage: TEXT (
raw_contents) for signature verification + JSONB (file_contents) for queries - Append-only: New versions create new rows keyed by
(jacs_id, jacs_version) - Soft delete:
remove_documentsetstombstoned = truerather than deleting rows - Fulltext search: PostgreSQL
tsvectorvia theSearchProvidertrait
Connection
Pass a standard PostgreSQL connection string (postgres://user:pass@host/db). The crate uses sqlx with the tokio-rustls runtime.
More Info
See the JACS README for the full storage backend overview.