Struct sea_schema::mysql::discovery::SchemaDiscovery
source ยท pub struct SchemaDiscovery {
pub query: SchemaQueryBuilder,
pub executor: Executor,
pub schema: SeaRc<dyn Iden>,
}
Available on crate features
mysql
and discovery
only.Fieldsยง
ยงquery: SchemaQueryBuilder
ยงexecutor: Executor
ยงschema: SeaRc<dyn Iden>
Implementationsยง
sourceยงimpl SchemaDiscovery
impl SchemaDiscovery
pub fn new<E>(executor: E, schema: &str) -> Selfwhere
E: IntoExecutor,
pub async fn discover(self) -> Result<Schema, SqlxError>
pub async fn discover_system(&mut self) -> Result<SystemInfo, SqlxError>
pub async fn discover_tables(&mut self) -> Result<Vec<TableInfo>, SqlxError>
pub async fn discover_table( &self, info: TableInfo, ) -> Result<TableDef, SqlxError>
pub async fn discover_columns( &self, schema: SeaRc<dyn Iden>, table: SeaRc<dyn Iden>, system: &SystemInfo, ) -> Result<Vec<ColumnInfo>, SqlxError>
pub async fn discover_indexes( &self, schema: SeaRc<dyn Iden>, table: SeaRc<dyn Iden>, ) -> Result<Vec<IndexInfo>, SqlxError>
pub async fn discover_foreign_keys( &self, schema: SeaRc<dyn Iden>, table: SeaRc<dyn Iden>, ) -> Result<Vec<ForeignKeyInfo>, SqlxError>
Auto Trait Implementationsยง
impl Freeze for SchemaDiscovery
impl !RefUnwindSafe for SchemaDiscovery
impl !Send for SchemaDiscovery
impl !Sync for SchemaDiscovery
impl Unpin for SchemaDiscovery
impl !UnwindSafe for SchemaDiscovery
Blanket Implementationsยง
sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more