Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

support IN operator in WHERE clause of SELECT #3

Open
thurstonsand opened this issue Jul 26, 2016 · 0 comments
Open

support IN operator in WHERE clause of SELECT #3

thurstonsand opened this issue Jul 26, 2016 · 0 comments

Comments

@thurstonsand
Copy link
Owner

specifics: http://docs.datastax.com/en/cql/3.1/cql/cql_reference/select_r.html?scroll=reference_ds_d35_v2q_xj__selectIN

ideas:

  1. predefined case class that takes a type parameter and takes a List as parameter. easy to implement, but cumbersome to use
case class PredefinedIn[T](l: List[T])
case class MyTable(str: String)
case class MyQuery(str: PredefinedIn[String])
ss.select("mytable", MyQuery(PredefinedIn(List("a", "b", "c"))))

1a) implicit conversion for magical convenience? easier to use, but can people figure out what's happening?

case class MyQuery(str: PredefinedIn[String])
implicit def normal2Predefined[T](l: List[T]): PredefinedIn[T] = PredefinedIn[T](l)
ss.select("mytable", MyQuery(List("a", "b", "c"))
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant