(&self, sql: &str)
| 45 | } |
| 46 | |
| 47 | async fn execute(&self, sql: &str) -> Result<DbResponse, PgSqliteError> { |
| 48 | match self { |
| 49 | QueryHandlerImpl::Direct(db) => { |
| 50 | db.execute(sql).await |
| 51 | }, |
| 52 | QueryHandlerImpl::Routed(router) => { |
| 53 | // For routed queries, we need the session state to determine transaction status |
| 54 | let session = SessionState::new("temp".to_string(), "temp".to_string()); |
| 55 | router.execute_query(sql, &session).await |
| 56 | .map_err(|e| PgSqliteError::Protocol(e.to_string())) |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | async fn get_schema_type(&self, table: &str, column: &str) -> Result<Option<String>, PgSqliteError> { |
| 62 | match self { |
no test coverage detected