MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / J

Class J

test/ext/test_indexable.py:68–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 Base = declarative_base()
67
68 class J(Base):
69 __tablename__ = "j"
70 id = Column("id", Integer, primary_key=True)
71 json = Column("_json", JSON, default={})
72 field = index_property("json", "field")
73
74 j = J(json={"a": 1, "b": 2})
75 assert_raises(AttributeError, lambda: j.field)

Callers 3

test_jsonMethod · 0.85
test_set_mutable_dictMethod · 0.85

Calls 2

ColumnClass · 0.90
index_propertyClass · 0.90

Tested by 3

test_jsonMethod · 0.68
test_set_mutable_dictMethod · 0.68