incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pruner, Anne (Anne)" <pru...@avaya.com>
Subject bind prepared statement for "IN" select statements
Date Tue, 09 Jul 2013 15:21:02 GMT
Has anyone tried binding a prepared statement for an "IN" query?

For example,

protected PreparedStatement getUserInList = prepare(QueryBuilder.select(ADDRESS, USER).from(USER_BY_ADDRESS_COLUMN_FAMILY)
            .where(QueryBuilder.in(ADDRESS, QueryBuilder.bindMarker())));

Object[] addressList = {"abc", "def", "ghi"};
ResultSet results = execute(getUserInList.bind(addressList));


This results in a java.lang.IllegalArgumentException: Prepared statement has only 1 variables,
3 values provided

Any ideas?
Thanks,
Anne Pruner




Mime
View raw message