MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Vertex

Class Vertex

test/typing/plain_files/orm/composite_dc.py:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class Vertex(Base):
24 __tablename__ = "vertices"
25
26 id: Mapped[int] = mapped_column(primary_key=True)
27 x1: Mapped[int]
28 y1: Mapped[int]
29 x2: Mapped[int]
30 y2: Mapped[int]
31
32 # inferred from right hand side
33 start = composite(Point, "x1", "y1")
34
35 # taken from left hand side
36 end: Mapped[Point] = composite(Point, "x2", "y2")
37
38
39v1 = Vertex(start=Point(3, 4), end=Point(5, 6))

Callers 1

composite_dc.pyFile · 0.70

Calls 2

mapped_columnFunction · 0.90
compositeFunction · 0.90

Tested by

no test coverage detected