Problem
Currently ydb-sqlalchemy does not support the JsonDocument type. When writing a column of type JsonDocument, the parameter is always cast to Json, resulting in the error:
Failed to convert 'meta_info': Json to Optional<JsonDocument>
The issue is in compiler/base.py where the type is always mapped to Json.
Workaround
sqla.text(f"CAST(:{param_name} AS JsonDocument)").bindparams(bindvalue)
Expected behavior
JsonDocument should be a first-class supported type in ydb-sqlalchemy, both for reading and writing.
Problem
Currently
ydb-sqlalchemydoes not support theJsonDocumenttype. When writing a column of typeJsonDocument, the parameter is always cast toJson, resulting in the error:The issue is in
compiler/base.pywhere the type is always mapped toJson.Workaround
Expected behavior
JsonDocumentshould be a first-class supported type inydb-sqlalchemy, both for reading and writing.