-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
support columns comparison on permission rules #2040
Comments
Hi @22mahmoud, currently we do not have support for operators which work on columns of the same table. This is being tracked here. A quick and dirty workaround is to use a view as follows: create view bid_v as select u.*, (u.amount > u.price) as is_amount_greater from bid u; Then you can query it as follows: {
bid_v(where: {is_amount_greater: {_eq: true}}) {
amount
}
} |
@rakeshkky Given the conversation with @22mahmoud on discord I think @22mahmoud wants to use it in a permission rule as a check constraint. |
as @coco98 said I want to use it in a permission rule as a check |
@rikinsk We already support column operators in permission definitions on server side, the operators are |
In my case, I have "bid" table has "amount" column and I want to check if that amount greater than the current "price" in the "auction" table.
expected query
The text was updated successfully, but these errors were encountered: