Skip to content

Smart query - ability to add custom data types #90

Description

@kehh

I've been using the SmartQueryMixin and really love how easy it is to add filters to my FastAPI based API based on this simple syntax. However I'm using the Ltree datatype from https://sqlalchemy-utils.readthedocs.io/en/latest/_modules/sqlalchemy_utils/types/ltree.html and I'd like to be able to use some of the functionality from that in smart queries. Is there a way to extend the smart query syntax to support custom data types? I really like the way the mixin can traverse relationships automatically.

For this specific example I have a table with a relationship to another table that contains an ltree in a field called path. I'm wanting something like:

relationship_name___path__descendant_of: "1.2.3.5.7"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions