Type Alias parser_database::walkers::ImplicitManyToManyRelationWalker
source · pub type ImplicitManyToManyRelationWalker<'db> = Walker<'db, ManyToManyRelationId>;
Expand description
Describes an implicit m:n relation between two models. Neither side defines fields, attributes or referential actions, which are all inferred by Prisma.
Aliased Type§
struct ImplicitManyToManyRelationWalker<'db> {
pub db: &'db ParserDatabase,
pub id: ManyToManyRelationId,
}
Fields§
§db: &'db ParserDatabase
The parser database being traversed.
id: ManyToManyRelationId
The identifier of the focused element.
Implementations§
source§impl<'db> ImplicitManyToManyRelationWalker<'db>
impl<'db> ImplicitManyToManyRelationWalker<'db>
sourcepub fn is_self_relation(self) -> bool
pub fn is_self_relation(self) -> bool
Is this a many-to-many self-relation?
sourcepub fn model_a(self) -> ModelWalker<'db>
pub fn model_a(self) -> ModelWalker<'db>
The model which comes first in the alphabetical order.
sourcepub fn model_b(self) -> ModelWalker<'db>
pub fn model_b(self) -> ModelWalker<'db>
The model which comes after model a in the alphabetical order.
sourcepub fn field_a(self) -> RelationFieldWalker<'db>
pub fn field_a(self) -> RelationFieldWalker<'db>
The field that defines the relation in model a.
sourcepub fn field_b(self) -> RelationFieldWalker<'db>
pub fn field_b(self) -> RelationFieldWalker<'db>
The field that defines the relation in model b.
sourcepub fn as_relation(self) -> RelationWalker<'db>
pub fn as_relation(self) -> RelationWalker<'db>
Traverse this relation as a generic relation.
sourcepub fn relation_name(self) -> RelationName<'db>
pub fn relation_name(self) -> RelationName<'db>
The name of the relation.
sourcepub fn column_a_name(self) -> &'static str
pub fn column_a_name(self) -> &'static str
The name of the column pointing to model A in the implicit join table.
sourcepub fn column_b_name(self) -> &'static str
pub fn column_b_name(self) -> &'static str
The name of the column pointing to model B in the implicit join table.
sourcepub fn table_name(self) -> ImplicitManyToManyRelationTableName<'db>
pub fn table_name(self) -> ImplicitManyToManyRelationTableName<'db>
A representation of the table/collection implicit in this relation.