Skip to content

Commit 7c1dec5

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 a6d9d8c commit 7c1dec5

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
@@ -8,6 +8,8 @@ Unreleased
88
- SQLAlchemy DDL: Allow turning off column store using ``crate_columnstore=False``.
99
Thanks, @fetzerms.
1010

11+
- SQLAlchemy: Fix SQL statement caching for CrateDB's ``OBJECT`` type.
12+
1113

1214
2023/04/18 0.31.1
1315
=================

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)