MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / get_database_backend

Method get_database_backend

src/database/db_connection.rs:107–121  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

105#[async_trait::async_trait]
106impl ConnectionTrait for DatabaseConnection {
107 fn get_database_backend(&self) -> DbBackend {
108 match self {
109 #[cfg(feature = "sqlx-mysql")]
110 DatabaseConnection::SqlxMySqlPoolConnection(_) => DbBackend::MySql,
111 #[cfg(feature = "sqlx-postgres")]
112 DatabaseConnection::SqlxPostgresPoolConnection(_) => DbBackend::Postgres,
113 #[cfg(feature = "sqlx-sqlite")]
114 DatabaseConnection::SqlxSqlitePoolConnection(_) => DbBackend::Sqlite,
115 #[cfg(feature = "mock")]
116 DatabaseConnection::MockDatabaseConnection(conn) => conn.get_database_backend(),
117 #[cfg(feature = "proxy")]
118 DatabaseConnection::ProxyDatabaseConnection(conn) => conn.get_database_backend(),
119 DatabaseConnection::Disconnected => panic!("Disconnected"),
120 }
121 }
122
123 #[instrument(level = "trace")]
124 #[allow(unused_variables)]

Callers 1

execute_unpreparedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected