0

I have a spring-boot application with spring-data-cassandra, I created a repository by extending CassandraRepository, in which one of my query i am trying to use Range(org.springframework.data.domain).

@Query("SELECT * FROM atable")
ResultSet findResult(Range myRange);

and while executing this query i am passing new Range(20,40), this Range is available in Cassandra database, but while executing this query I am getting IllegalArgumentException.PFB: Exception

java.lang.IllegalArgumentException: encountered unsupported query parameter type [class org.springframework.data.domain.Range]

In this question(IN clause with Spring Data and Cassandra @Query) in allowed Data types Range class is not specified, so, is it possible to query Cassandra in Spring boot app with Range.

Community
  • 1
  • 1
anonymous
  • 483
  • 2
  • 8
  • 24

1 Answers1

0

As you can see in the question you've addressed here,

question(IN clause with Spring Data and Cassandra @Query)

you need to use filtering in your sql where condition, like here:

...  first_name IN (?1)
nevsv
  • 2,448
  • 1
  • 14
  • 21