Skip to content

Commit cbb1053

Browse files
committed
SQLAlchemy: Fix SQL statement caching for CrateDB's OBJECT type
The SQLAlchemy implementation of CrateDB's `OBJECT` type offers indexed access to the instance's content in form of a dictionary. Thus, it must not use `cache_ok = True` on its implementation, i.e. this part of the compiled SQL clause must not be cached.
1 parent 1d035a7 commit cbb1053

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Unreleased
1313

1414
- Allow handling datetime values tagged with time zone info when inserting or updating.
1515

16+
- SQLAlchemy: Fix SQL statement caching for CrateDB's ``OBJECT`` type.
17+
1618

1719
2023/04/18 0.31.1
1820
=================

src/crate/client/sqlalchemy/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def __eq__(self, other):
132132

133133

134134
class _Craty(sqltypes.UserDefinedType):
135-
cache_ok = True
135+
cache_ok = False
136136

137137
class Comparator(sqltypes.TypeEngine.Comparator):
138138

0 commit comments

Comments
 (0)