v0.3.3-pre.005

This commit is contained in:
2026-08-30 12:42:50 +02:00
parent 917e602a87
commit 66a3926adb
14 changed files with 1106 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-postgres-lib/src/runtime.rs
// version: 6
// version: 7
const APPLICATION_NAME: &str = "ksp-store";
const MAX_CONNECTION_URI_BYTES: usize = 4_096;
@@ -364,6 +364,24 @@ impl PostgresBackend {
return crate::get_raw_transaction_tombstone(&self.pool, &self.network, reference).await;
}
/// Persists one canonical RAW transaction and its acquisition observation atomically.
pub async fn persist_raw_transaction_acquisition(
&self,
raw_transaction: ksp_store_api::RawTransaction,
observation: ksp_store_api::RawTransactionObservation,
mode: ksp_store_api::RawTransactionAcquisitionMode,
) -> std::result::Result<ksp_store_api::RawAcquisitionWriteOutcome, crate::PostgresBackendError> {
return crate::persist_raw_transaction_acquisition(&self.pool, &self.network, raw_transaction, observation, mode).await;
}
/// Persists one additional acquisition observation for an existing RAW transaction.
pub async fn record_raw_transaction_observation(
&self,
observation: ksp_store_api::RawTransactionObservation,
) -> std::result::Result<ksp_store_api::RawObservationWriteOutcome, crate::PostgresBackendError> {
return crate::record_raw_transaction_observation(&self.pool, &self.network, observation).await;
}
/// Explicitly closes the pool and waits for all owned pooled objects to drain inside the supplied bound.
pub async fn close(self, timeout: std::time::Duration) -> std::result::Result<(), crate::PostgresBackendError> {
self.pool.close();