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>

source

pub fn is_self_relation(self) -> bool

Is this a many-to-many self-relation?

source

pub fn model_a(self) -> ModelWalker<'db>

The model which comes first in the alphabetical order.

source

pub fn model_b(self) -> ModelWalker<'db>

The model which comes after model a in the alphabetical order.

source

pub fn field_a(self) -> RelationFieldWalker<'db>

The field that defines the relation in model a.

source

pub fn field_b(self) -> RelationFieldWalker<'db>

The field that defines the relation in model b.

source

pub fn as_relation(self) -> RelationWalker<'db>

Traverse this relation as a generic relation.

source

pub fn relation_name(self) -> RelationName<'db>

The name of the relation.

source

pub fn column_a_name(self) -> &'static str

The name of the column pointing to model A in the implicit join table.

source

pub fn column_b_name(self) -> &'static str

The name of the column pointing to model B in the implicit join table.

source

pub fn table_name(self) -> ImplicitManyToManyRelationTableName<'db>

A representation of the table/collection implicit in this relation.