MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / RelationshipInfo

Class RelationshipInfo

sqlmodel/main.py:171–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169
170
171class RelationshipInfo(Representation):
172 def __init__(
173 self,
174 *,
175 back_populates: str | None = None,
176 cascade_delete: bool | None = False,
177 passive_deletes: bool | Literal["all"] | None = False,
178 link_model: Any | None = None,
179 sa_relationship: RelationshipProperty | None = None,
180 sa_relationship_args: Sequence[Any] | None = None,
181 sa_relationship_kwargs: Mapping[str, Any] | None = None,
182 ) -> None:
183 if sa_relationship is not None:
184 if sa_relationship_args is not None:
185 raise RuntimeError(
186 "Passing sa_relationship_args is not supported when "
187 "also passing a sa_relationship"
188 )
189 if sa_relationship_kwargs is not None:
190 raise RuntimeError(
191 "Passing sa_relationship_kwargs is not supported when "
192 "also passing a sa_relationship"
193 )
194 self.back_populates = back_populates
195 self.cascade_delete = cascade_delete
196 self.passive_deletes = passive_deletes
197 self.link_model = link_model
198 self.sa_relationship = sa_relationship
199 self.sa_relationship_args = sa_relationship_args
200 self.sa_relationship_kwargs = sa_relationship_kwargs
201
202
203@dataclass

Callers 1

RelationshipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…