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

Function get_current_schema

sea-orm-migration/src/migrator.rs:457–471  ·  view source on GitHub ↗
(db: &C)

Source from the content-addressed store, hash-verified

455}
456
457fn get_current_schema<C>(db: &C) -> SimpleExpr
458where
459 C: ConnectionTrait,
460{
461 match db.get_database_backend() {
462 #[cfg(feature = "sqlx-mysql")]
463 DbBackend::MySql => sea_schema::mysql::MySql::get_current_schema(),
464 #[cfg(feature = "sqlx-postgres")]
465 DbBackend::Postgres => sea_schema::postgres::Postgres::get_current_schema(),
466 #[cfg(feature = "sqlx-sqlite")]
467 DbBackend::Sqlite => sea_schema::sqlite::Sqlite::get_current_schema(),
468 #[allow(unreachable_patterns)]
469 other => panic!("{other:?} feature is off"),
470 }
471}
472
473#[derive(DeriveIden)]
474enum InformationSchema {

Callers 2

query_mysql_foreign_keysFunction · 0.85
query_pg_typesFunction · 0.85

Calls 1

get_database_backendMethod · 0.45

Tested by

no test coverage detected