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"), } } }