pub struct Schema {
pub structs: Vec<Struct>,
pub enums: Vec<EnumDef>,
pub models: Vec<Model>,
}Fields§
§structs: Vec<Struct>§enums: Vec<EnumDef>§models: Vec<Model>Implementations§
Source§impl Schema
impl Schema
Sourcepub fn find_model(&self, name: &str) -> Option<&Model>
pub fn find_model(&self, name: &str) -> Option<&Model>
Find a model by name
Sourcepub fn find_struct(&self, name: &str) -> Option<&Struct>
pub fn find_struct(&self, name: &str) -> Option<&Struct>
Find a struct by name (Sprint 8)
Sourcepub fn detect_relations(&self) -> Vec<RelationPair>
pub fn detect_relations(&self) -> Vec<RelationPair>
Detect one-to-many relationships by finding matching reference and collection fields
Sourcepub fn detect_many_to_many_relations(&self) -> Vec<ManyToManyRelation>
pub fn detect_many_to_many_relations(&self) -> Vec<ManyToManyRelation>
Detect many-to-many relationships by finding bidirectional OneToMany fields Returns pairs where Model A has [ModelB] and Model B has [ModelA] Excludes relationships that are already handled by FK references (1:N)
Trait Implementations§
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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