From f24a693f726fc407a8568a814969b680498df565 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 16 Jan 2024 00:45:18 +0100 Subject: [PATCH] Types: Add method `ObjectArray.as_generic` AFAIK, it is needed for reverse type lookups. --- src/sqlalchemy_cratedb/type/array.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sqlalchemy_cratedb/type/array.py b/src/sqlalchemy_cratedb/type/array.py index ae68d4b4..854aac5f 100644 --- a/src/sqlalchemy_cratedb/type/array.py +++ b/src/sqlalchemy_cratedb/type/array.py @@ -140,5 +140,8 @@ def any(self, other, operator=operators.eq): def get_col_spec(self, **kws): return "ARRAY(OBJECT)" + def as_generic(self, **kwargs): + return sqltypes.ARRAY + ObjectArray = MutableList.as_mutable(_ObjectArray)