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

Bind parameters as function arguments result in syntax error #21

Closed
sepbot opened this issue May 26, 2021 · 0 comments
Closed

Bind parameters as function arguments result in syntax error #21

sepbot opened this issue May 26, 2021 · 0 comments

Comments

@sepbot
Copy link

sepbot commented May 26, 2021

Consider the following query, which executes without any issues on arangodb:

FOR record IN records
  FILTER HAS(record.haystack, @needle)
  RETURN record

It results in the following syntax error with the plugin where the comma appears right after record.haystack:

'(', ')', ',', '.' or '[' expected, got ','

Interesting note: the error doesn't make sense because it states expected comma but instead got comma 😄

If I use a bind parameter as a first argument instead I get a slightly different error message where the comma appears. The same error will appear regardless of whether the following arguments are bound or not.

'(', ')' or ',' expected, got ','

If I replace @needle with a double quoted string, the syntax error goes away.

I tried it with a bunch of different functions and it yielded the same result.

IDE: IntelliJ IDEA 2021.1.1
Plugin: 1.0.6-2020.3.2
ArangoDB: 3.7.11

@machak machak closed this as completed in fd4078d Jun 21, 2021
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