MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Item

Class Item

examples/association/proxied_association.py:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46class Item(Base):
47 __tablename__ = "item"
48 item_id: Mapped[int] = mapped_column(primary_key=True)
49 description: Mapped[str] = mapped_column(String(30))
50 price: Mapped[float]
51
52 def __init__(self, description: str, price: float) -> None:
53 self.description = description
54 self.price = price
55
56 def __repr__(self) -> str:
57 return "Item({!r}, {!r})".format(self.description, self.price)
58
59
60class OrderItem(Base):

Callers 1

Calls 2

mapped_columnFunction · 0.90
StringClass · 0.90

Tested by

no test coverage detected