This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-21 14:01:57 +04:00
1 parent cac4c6da2e
commit 260ead64da
19 files changed
+772 -771

No files matched your search

+8 -1
View File
@@ -118,8 +118,15 @@ reattach_ssl_mode_to_url = reattach_ssl_params_to_url
class JSONField(types.TypeDecorator):
"""Store arbitrary Python objects as JSON-encoded TEXT.
Used instead of native JSON columns for portability across SQLite and
PostgreSQL. Values are serialized with ``json.dumps`` on write and
deserialized with ``json.loads`` on read.
"""
impl = types.Text
cache_ok = True
cache_ok = True # safe for statement caching (no per-instance state)
def process_bind_param(self, value: _T | None, dialect: Dialect) -> Any:
return json.dumps(value)