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

bug(SQLAlchemy): Handle edge case get-field and set-field operators #70

Open
Sambigeara opened this issue Mar 20, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Sambigeara
Copy link
Collaborator

Sambigeara commented Mar 20, 2024

In an earlier version of Cerbos, certain inputs could lead to complex query plan outputs. A full example can be seen in this issue.

As it stands, the SQLAlchemy adapter only handles a finite number of operators: and, or and not. In some query plans, we see other operators: get-field and set-field. These are currently unsupported and break the get_query function.

In general, I think we try to avoid those operators altogether, but I still think we should protect against them and allow successful query resolution.

@Sambigeara Sambigeara added the bug Something isn't working label Mar 20, 2024
@Sambigeara
Copy link
Collaborator Author

Counter-thought: would we want to output queries generated with complex plans like the above? We wouldn't want to topple the user's database 🤔.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant