Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elements.stream()
- .map( elem ->
- [bind a prepared statement that restricts all the clustering columns, restrict the enum column, and restrict the collection column to contain "enum" ) )
- .map( session::executeAsync )
- .map( ResultSetFuture::getUninterruptibly )
- .peek( rs -> {
- // double check the result set we are getting back
- int bad = 0;
- for(Row row : rs ){
- if( [clustering columns of row satisfy the specified restriction] ){
- System.out.println( "LIFE'S GOOD" );
- } else {
- bad++;
- System.out.println( "LIFE SUCKS" );
- }
- }
- System.out.println( "This query fails " + bad + " times." );
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement