Dealing with dynamic Query String in Cassandra

2019-08-15 18:20发布

问题:

I have employee table which has following column as id, firstName, lastName, email, age.

From UI, I have filter option which is coming as a query string. Let's say user want to filter data based on firstName and age, so query string will be ?firstName='John'&age>21.

I know in Cassandra, we need to create multiple tables based on criteria or use materialized view to filter the query.

Question: How we will identify which table/MV(repository) it has to call based on query string coming from UI?. Or you have some other option to deal with these kinds of scenario? I'm using Spring Boot as a backend.