Skip to content

Commit bda9012

Browse files
committed
Types: Emulate PostgreSQL's JSON(B) types using CrateDB's OBJECT
1 parent 67b2e32 commit bda9012

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sqlalchemy_cratedb/compiler.py

+6
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ def visit_FLOAT_VECTOR(self, type_, **kw):
245245
raise ValueError("FloatVector must be initialized with dimension size")
246246
return f"FLOAT_VECTOR({dimensions})"
247247

248+
def visit_JSON(self, type_, **kw):
249+
return "OBJECT"
250+
251+
def visit_JSONB(self, type_, **kw):
252+
return "OBJECT"
253+
248254

249255
class CrateCompiler(compiler.SQLCompiler):
250256

0 commit comments

Comments
 (0)