MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / json_property

Class json_property

test/ext/test_indexable.py:265–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263 Base = cls.DeclarativeBasic
264
265 class json_property(index_property):
266 def __init__(self, attr_name, index, cast_type):
267 super().__init__(attr_name, index)
268 self.cast_type = cast_type
269
270 def expr(self, model):
271 expr = super().expr(model)
272 return expr.astext.cast(self.cast_type)
273
274 class Json(ComparableEntity, Base):
275 __tablename__ = "json"

Callers 1

JsonClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected