Introduce run_db_operation_sync and run_db_operation

These functions are designed as a single funnel to talk to the database,
whether it is synchronous or asynchronous.

This single funnel will log SQL queries and slow operations, providing a clear
and unified debug message for the problematic query, so it can be optimized
accordingly (for instance, missing indexes or unbound SQL requests).
This commit is contained in:
Cesar Rodas
2025-08-11 11:55:52 -03:00
parent d24a968bd4
commit 937d9ac43b
3 changed files with 121 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ pub mod stmt;
pub mod value;
pub use cdk_common::database::ConversionError;
pub use common::{run_db_operation, run_db_operation_sync};
#[cfg(feature = "mint")]
pub mod mint;