I am trying to bind a Scala List after the "IN" keyword in a CQL WHERE clause.
I tried this
val session: com.datastax.driver.core.Session = ...
val deleteStatement = session.prepare(s"DELETE FROM table_name WHERE id IN ?;")
def deleteById(ids: List[String]): Try[Boolean] = {
val boundStatement = new BoundStatement(deleteStatement)
boundStatement.bind(ids)
session.execute(boundStatement).wasApplied()
}
But "boundStatement.bind" throws
Codec not found for requested operation: [list <-> scala.collection.immutable.$colon$colon]
How do I bind this list?