From 1074e1ba19a63028fe0a837f4907afefd5454606 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Thu, 31 Jul 2025 14:55:30 +0200 Subject: [PATCH] ... Signed-off-by: Lee Smet --- heromodels/src/db/postgres.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/heromodels/src/db/postgres.rs b/heromodels/src/db/postgres.rs index 73b4179..4f4247f 100644 --- a/heromodels/src/db/postgres.rs +++ b/heromodels/src/db/postgres.rs @@ -76,6 +76,8 @@ pub enum Error { FailedUpdate(usize), /// We tried to query the existence of a table but it failed TableExistenceQuery, + /// Transactions aren't supported + Transaction, } impl Postgres { @@ -334,7 +336,7 @@ where fn begin_transaction( &self, ) -> Result>, super::Error> { - todo!() + Err(Error::Transaction.into()) } } @@ -356,6 +358,7 @@ impl core::fmt::Display for Error { "update did not return the expected 1 modified row (got {amount})" )), Self::TableExistenceQuery => f.write_str("query to check if table exists failed"), + Self::Transaction => f.write_str("transactions aren't supported"), } } }