MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / A

Class A

test/ext/test_hybrid.py:1035–1060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033 Base = declarative_base()
1034
1035 class A(Base):
1036 __tablename__ = "a"
1037 id = Column(Integer, primary_key=True)
1038 _value = Column("value", String)
1039
1040 @hybrid.hybrid_property
1041 def value(self):
1042 return self._value
1043
1044 value_syn = synonym("value")
1045
1046 @hybrid.hybrid_property
1047 def string_value(self):
1048 return "foo"
1049
1050 string_value_syn = synonym("string_value")
1051
1052 @hybrid.hybrid_property
1053 def string_expr_value(self):
1054 return "foo"
1055
1056 @string_expr_value.expression
1057 def string_expr_value(cls):
1058 return literal_column("'foo'")
1059
1060 string_expr_value_syn = synonym("string_expr_value")
1061
1062 return A
1063

Callers

nothing calls this directly

Calls 2

ColumnClass · 0.90
synonymFunction · 0.90

Tested by

no test coverage detected