pub struct DatabaseSchema {
pub tables: Vec<TableInfo>,
}Expand description
Complete database schema information
Fields§
§tables: Vec<TableInfo>Implementations§
Source§impl DatabaseSchema
impl DatabaseSchema
Sourcepub fn requires_postgis(&self) -> bool
pub fn requires_postgis(&self) -> bool
Check if PostGIS extension is required
Sourcepub fn get_postgis_tables(&self) -> Vec<&TableInfo>
pub fn get_postgis_tables(&self) -> Vec<&TableInfo>
Get list of PostGIS tables
Sourcepub fn get_all_postgis_types(&self) -> HashMap<String, i32>
pub fn get_all_postgis_types(&self) -> HashMap<String, i32>
Get usage statistics for all PostGIS types
Sourcepub fn to_create_ddl(&self) -> String
pub fn to_create_ddl(&self) -> String
Generate CREATE DDL (considering dependencies)
Sourcepub fn to_drop_ddl(&self) -> String
pub fn to_drop_ddl(&self) -> String
Generate DROP DDL (reverse order of CREATE DDL)
Trait Implementations§
Source§impl Clone for DatabaseSchema
impl Clone for DatabaseSchema
Source§fn clone(&self) -> DatabaseSchema
fn clone(&self) -> DatabaseSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseSchema
impl Debug for DatabaseSchema
Source§impl<'de> Deserialize<'de> for DatabaseSchema
impl<'de> Deserialize<'de> for DatabaseSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DatabaseSchema
impl PartialEq for DatabaseSchema
Source§impl Serialize for DatabaseSchema
impl Serialize for DatabaseSchema
impl StructuralPartialEq for DatabaseSchema
Auto Trait Implementations§
impl Freeze for DatabaseSchema
impl RefUnwindSafe for DatabaseSchema
impl Send for DatabaseSchema
impl Sync for DatabaseSchema
impl Unpin for DatabaseSchema
impl UnwindSafe for DatabaseSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more