We are planning to use Spring Data Azure Cosmos DB v3. I see that we extend CosmosRepository interface and implement our repo and apply @Query annotation
@Query(value = "select * from c where c.firstName = @firstName and c.lastName = @lastName")
List<User> getUsersByTitleAndValue(@Param("firstName") int firstName, @Param("lastName") String lastName);
But we have a need to generate the sql used in @Query dynamically
E.g
String sql = "Select * from some table t"
if(someCondition){
sql.append(" where t.name="+ nameVar);
}
How to achieve this in Spring Data Azure Cosmos DB v3 ?