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

Parsing error due to missing manual quoting in the data driven queryables #243

Open
drnextgis opened this issue Sep 22, 2023 · 2 comments
Open

Comments

@drnextgis
Copy link

drnextgis commented Sep 22, 2023

Textual values in "Data driven queryables" need to be enclosed in quotes manually when the values contain special characters (e.g. -), a requirement that may not be immediately apparent. Failure to do so can result in a parsing error that is not appropriately detected and managed:

Problem in fetching content for https://***.Error details, {"code":"UnexpectedToken","description":"Unexpected token Token('__ANON_4', 'c377') at line 1, column 23.\nExpected one of: \n\t* OR\n\t* PLUS\n\t* $END\n\t* STAR\n\t* MINUS\n\t* SLASH\n\t* AND\nPrevious tokens: [Token('INT', '6276')]\n"}

It would be helpful if the plugin automatically wrapped values in quotes behind the scenes when it appears to be necessary.

@drnextgis
Copy link
Author

The plugin generates distinct requests based on whether the value is enclosed in single or double quotes. When enclosed in single quotes, everything functions as anticipated. However, when enclosed in double quotes, the PostgreSQL index (I utilize PgSTAC) for the used property is bypassed, and the results are never passed to the plugin (because it takes forever).

@drnextgis
Copy link
Author

drnextgis commented Sep 23, 2023

⚠️ Enclosing a value in double quotes generates an SQL query that searches for a property with a name equal to the double quoted value, rather than searching for the specified value itself.

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