You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if this is already implemented but I have not found this anywhere in the docs.
I am letting the user enter an rsql query to filter records in a table within a spring webservice. This works perfectly fine when a valid query is provided.
But, how to I represent an empty filter? i.e select * from x without any where clause. Passing an empty or null query string to the rsql parser does not work with error: "Encountered EOF at line 0, column 0".
I am currently forced to use workarounds like primaryKey!=-1 or create a similar condition that does not skip any records to achieve this.
The text was updated successfully, but these errors were encountered:
In the end, Rsql parser returns an object Specification<M> for entity M. The method findAll(Specification<M>, Pageable) of JpaSpecificationExecutor<M> accepts null as first argument, thus you can simply check your query beforehand. I usually do like this:
I am not sure if this is already implemented but I have not found this anywhere in the docs.
I am letting the user enter an rsql query to filter records in a table within a spring webservice. This works perfectly fine when a valid query is provided.
But, how to I represent an empty filter? i.e
select * from x
without any where clause. Passing an empty or null query string to the rsql parser does not work with error: "Encountered EOF at line 0, column 0".I am currently forced to use workarounds like
primaryKey!=-1
or create a similar condition that does not skip any records to achieve this.The text was updated successfully, but these errors were encountered: