development_postgress #11

Merged
lee merged 11 commits from development_postgress into main 2025-07-31 13:32:49 +00:00
Showing only changes of commit 1074e1ba19 - Show all commits

View File

@ -76,6 +76,8 @@ pub enum Error {
FailedUpdate(usize), FailedUpdate(usize),
/// We tried to query the existence of a table but it failed /// We tried to query the existence of a table but it failed
TableExistenceQuery, TableExistenceQuery,
/// Transactions aren't supported
Transaction,
} }
impl Postgres { impl Postgres {
@ -334,7 +336,7 @@ where
fn begin_transaction( fn begin_transaction(
&self, &self,
) -> Result<Box<dyn super::Transaction<Error = Self::Error>>, super::Error<Self::Error>> { ) -> Result<Box<dyn super::Transaction<Error = Self::Error>>, super::Error<Self::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})" "update did not return the expected 1 modified row (got {amount})"
)), )),
Self::TableExistenceQuery => f.write_str("query to check if table exists failed"), Self::TableExistenceQuery => f.write_str("query to check if table exists failed"),
Self::Transaction => f.write_str("transactions aren't supported"),
} }
} }
} }