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

Custom Native operator is not recognized #112

Closed
vctls opened this issue Jan 23, 2019 · 1 comment
Closed

Custom Native operator is not recognized #112

vctls opened this issue Jan 23, 2019 · 1 comment

Comments

@vctls
Copy link

vctls commented Jan 23, 2019

It may be a duplicate of #40 .
I'm trying to create an "isnull" operator with two implementations, to be used on objects and query builders.
But the native rule doesn't even get to the compile part. It fails in the Llk/Parser.php
Unexpected token "isnull" (identifier)

Is it even possible to create custom native operators?

@vctls
Copy link
Author

vctls commented Jan 23, 2019

Ok, it works with the syntax isnull(object_or_property).
I'm not sure I fully understand the grammar, but I suppose the parser expects a specific syntax for an operation that only takes one parameter.
Sadly, Doctrine doesn't allow comparison with null on associations, so isnull(association) throws a Semantical Error.

@vctls vctls closed this as completed Jan 23, 2019
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