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 1d035a7 commit cbb1053
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 @@ -13,6 +13,8 @@ Unreleased

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

- 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 cbb1053

Please sign in to comment.