cqlsh:mykeyspace> create table sample ( column1 int ,column2 int , column3 int ,column4 int,primary KEY (column1,column2,column3));
cqlsh:mykeyspace> SELECT * FROM sample ;
column1 | column2 | column3 | column4
---------+---------+---------+---------
1 | 2 | 3 | 4
1 | 3 | 4 | 4
1 | 4 | 5 | 4
1 | 5 | 4 | 4
cqlsh:mykeyspace> select * from sample where column1=1 and (column2,column3) in ((2,3),(3,4));
column1 | column2 | column3 | column4
---------+---------+---------+---------
1 | 2 | 3 | 4
1 | 3 | 4 | 4
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.
--
Olivier Michallat
Driver & tools engineer, DataStax
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
the first param List<String> names seems like a bug .it gives error message to replace with a string.
--
Olivier Michallat
Driver & tools engineer, DataStax
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.
IllegalArgumentException
- if names.size() != values.size()
. Caused by: java.lang.IllegalArgumentException: The number of names (2) and values (50) don't match
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.
List<String> names = ImmutableList.of("a", "b");
List<List<?>> values = ImmutableList.<List<?>>of(
ImmutableList.of(1, "foo"),
ImmutableList.of(2, "bar"),
ImmutableList.of(3, "qix"));
BuiltStatement select = select().all().from("t").where(eq("pk", 1)).and(in(names, values));
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
--
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.