@@ -14,8 +14,8 @@ use chrono::{DateTime, Utc};
1414use regex:: Regex ;
1515use sea_orm:: {
1616 ActiveModelTrait , ConnectOptions , ConnectionTrait , Database , DatabaseBackend ,
17- DatabaseConnection , DbBackend , DbConn , DbErr , EntityTrait , ExprTrait , IntoActiveModel ,
18- Statement ,
17+ DatabaseConnection , DatabaseConnectionType , DbBackend , DbConn , DbErr , EntityTrait , ExprTrait ,
18+ IntoActiveModel , Statement ,
1919} ;
2020use sea_orm_migration:: MigratorTrait ;
2121use std:: fmt:: Write as FmtWrites ;
@@ -86,8 +86,8 @@ impl MultiDb {
8686/// This function will return an error if IO fails
8787#[ allow( clippy:: match_wildcard_for_single_variants) ]
8888pub async fn verify_access ( db : & DatabaseConnection ) -> AppResult < ( ) > {
89- match db {
90- DatabaseConnection :: SqlxPostgresPoolConnection ( _) => {
89+ match db. inner {
90+ DatabaseConnectionType :: SqlxPostgresPoolConnection ( _) => {
9191 let res = db
9292 . query_all_raw ( Statement :: from_string (
9393 DatabaseBackend :: Postgres ,
@@ -100,7 +100,7 @@ pub async fn verify_access(db: &DatabaseConnection) -> AppResult<()> {
100100 ) ) ;
101101 }
102102 }
103- DatabaseConnection :: Disconnected => {
103+ DatabaseConnectionType :: Disconnected => {
104104 return Err ( Error :: string ( "connection to database has been closed" ) ) ;
105105 }
106106 _ => { }
0 commit comments