MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / User

Class User

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

Source from the content-addressed store, hash-verified

13
14
15class User(Base):
16 __tablename__ = "User"
17
18 id: Mapped[int] = mapped_column(primary_key=True)
19 name: Mapped[str]
20
21 @validates("name", include_removes=True)
22 def validate_name(self, name: str) -> str:
23 """test #8577"""
24 return name + "hi"
25
26 # test #9536
27 _password: Mapped[str] = mapped_column("Password", String)
28 password1: Mapped[str] = column_property(
29 _password.collate("SQL_Latin1_General_CP1_CS_AS"), deferred=True
30 )
31 password2: Mapped[str] = deferred(
32 _password.collate("SQL_Latin1_General_CP1_CS_AS")
33 )
34 password3: Mapped[str] = query_expression(
35 _password.collate("SQL_Latin1_General_CP1_CS_AS")
36 )

Callers

nothing calls this directly

Calls 5

mapped_columnFunction · 0.90
column_propertyFunction · 0.90
deferredFunction · 0.90
query_expressionFunction · 0.90
collateMethod · 0.45

Tested by

no test coverage detected