Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Array contains operation is not supported #613

Copy link
Copy link
Open
@csibe17

Description

@csibe17
Issue body actions

When creating an Array type column, the contains operation is not supported.

To reproduce

from sqlalchemy import ARRAY, String
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column

class Base(DeclarativeBase):
    pass

class Sample(Base):
    __tablename__ = "sample_table"
    sample_field: Mapped[list[str]] = mapped_column(ARRAY(String(20)), nullable=False)

...

stmt = select(Sample).filter(Sample.sample_field.contains("test"))

Error

NotImplementedError: ARRAY.contains() not implemented for the base ARRAY type; please use the dialect-specific ARRAY type

Going through the spanner dialect code, I could not find any array type I could import.

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.Issues related to the googleapis/python-spanner-sqlalchemy API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.