Skip to content

Commit 70549f0

Browse files
committed
Types: Emulate PostgreSQL's JSON(B) types using CrateDB's OBJECT
1 parent 6db4702 commit 70549f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sqlalchemy_cratedb/compiler.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ def visit_TIMESTAMP(self, type_, **kw):
255255
(type_.timezone and "WITH" or "WITHOUT") + " TIME ZONE",
256256
)
257257

258+
def visit_JSON(self, type_, **kw):
259+
return "OBJECT"
260+
261+
def visit_JSONB(self, type_, **kw):
262+
return "OBJECT"
263+
258264

259265
class CrateCompiler(compiler.SQLCompiler):
260266

0 commit comments

Comments
 (0)