MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / JSONTest

Class JSONTest

test/typing/plain_files/dialects/postgresql/pg_stuff.py:176–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 """Test JSON type in ORM mapped columns."""
175
176 class JSONTest(Base):
177 __tablename__ = "test_json"
178 id = mapped_column(Integer, primary_key=True)
179 json_data: Mapped[Dict[str, Any]] = mapped_column(JSON)
180 json_list: Mapped[List[Any]] = mapped_column(JSON)
181
182 json_obj = JSONTest()
183 assert_type(json_obj.json_data, Dict[str, Any])

Callers 1

test_json_orm_mappingFunction · 0.70

Calls 1

mapped_columnFunction · 0.90

Tested by 1

test_json_orm_mappingFunction · 0.56