Skip to content

Type LONGVARCHAR not handled well #23

@mkindalov

Description

@mkindalov

Given from sqlalchemy_iris import LONGVARCHAR
class XxxEntity(Base):
data: Mapped[str] = mapped_column(LONGVARCHAR)

When trying to apply alembic migration there is error.
"sqlalchemy.exc.CompileError: (in table 'event', column 'data'): Compiler <sqlalchemy_iris.base.IRISTypeCompiler object at 0x108996c10> can't render element of type LONGVARCHAR"

Our workaround is:
from sqlalchemy_iris.base import IRISTypeCompiler
IRISTypeCompiler.visit_LONGVARCHAR = lambda self, type_, **kw: "LONGVARCHAR"

I guess there is a missing method in IRISTypeCompiler.
Could be that other methods are missing as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions