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

Class JSONTest

test/typing/plain_files/dialects/mysql/mysql_stuff.py:47–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 """Test JSON type in ORM mapped columns."""
46
47 class JSONTest(Base):
48 __tablename__ = "test_json"
49 id = mapped_column(Integer, primary_key=True)
50 json_data: Mapped[Dict[str, Any]] = mapped_column(JSON)
51 json_list: Mapped[List[Any]] = mapped_column(JSON)
52
53 json_obj = JSONTest()
54 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