Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart query - ability to add custom data types #90

Open
kehh opened this issue Jun 30, 2022 · 0 comments
Open

Smart query - ability to add custom data types #90

kehh opened this issue Jun 30, 2022 · 0 comments

Comments

@kehh
Copy link

kehh commented Jun 30, 2022

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant