Struct sea_schema::postgres::discovery::SchemaDiscovery
source · [−]pub struct SchemaDiscovery {
pub query: SchemaQueryBuilder,
pub executor: Executor,
pub schema: SeaRc<dyn Iden>,
}
This is supported on crate features
postgres
and discovery
only.Fields
query: SchemaQueryBuilder
executor: Executor
schema: SeaRc<dyn Iden>
Implementations
sourceimpl SchemaDiscovery
impl SchemaDiscovery
pub fn new<E>(executor: E, schema: &str) -> Self where
E: IntoExecutor,
pub async fn discover(&self) -> Schema
pub async fn discover_tables(&self) -> Vec<TableInfo>
pub async fn discover_table(&self, info: TableInfo) -> TableDef
pub async fn discover_columns(
&self,
schema: SeaRc<dyn Iden>,
table: SeaRc<dyn Iden>
) -> Vec<ColumnInfo>
pub async fn discover_constraints(
&self,
schema: SeaRc<dyn Iden>,
table: SeaRc<dyn Iden>
) -> Vec<Constraint>
pub async fn discover_enums(&self) -> Vec<EnumDef>
Auto Trait Implementations
impl !RefUnwindSafe for SchemaDiscovery
impl !Send for SchemaDiscovery
impl !Sync for SchemaDiscovery
impl Unpin for SchemaDiscovery
impl !UnwindSafe for SchemaDiscovery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more