Skip to content

Commit

Permalink
SQLAlchemy: Fix SQL statement caching for CrateDB's OBJECT type
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amotl committed Jul 4, 2023
1 parent a6d9d8c commit 7c1dec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Unreleased
- SQLAlchemy DDL: Allow turning off column store using ``crate_columnstore=False``.
Thanks, @fetzerms.

- SQLAlchemy: Fix SQL statement caching for CrateDB's ``OBJECT`` type.


2023/04/18 0.31.1
=================
Expand Down
2 changes: 1 addition & 1 deletion src/crate/client/sqlalchemy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __eq__(self, other):


class _Craty(sqltypes.UserDefinedType):
cache_ok = True
cache_ok = False

class Comparator(sqltypes.TypeEngine.Comparator):

Expand Down

0 comments on commit 7c1dec5

Please sign in to comment.