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

Add where parameter and deprecate filters parameter #116

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

guvra
Copy link
Collaborator

@guvra guvra commented Feb 28, 2024

New filter syntax:

tables:
    customer:
        where: 'email like "%@test.org" or created_at > date_sub(now(), interval 55 day)'

A query validator is making sure that the query does not include any dangerous statement (execute, drop, alter...).

The PR deprecates the filters param.
This param is restrictive, and it already allows to inject raw SQL in some way (with expr: syntax), so it's barely more secure than a plain where.

@guvra guvra marked this pull request as draft February 28, 2024 11:56
@guvra guvra force-pushed the feat-where-parameter branch 5 times, most recently from 7625d41 to 333701b Compare March 4, 2024 14:48
@guvra guvra marked this pull request as ready for review March 5, 2024 08:57
@guvra guvra force-pushed the feat-where-parameter branch 2 times, most recently from e207a0c to 05f2df4 Compare March 5, 2024 09:02
@guvra guvra force-pushed the feat-where-parameter branch from 05f2df4 to d8aeda7 Compare March 5, 2024 09:03
@guvra guvra merged commit 6147375 into main Mar 5, 2024
3 checks passed
@guvra guvra deleted the feat-where-parameter branch March 5, 2024 09:05
@guvra guvra added the feature New feature or request label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant