Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. elements.stream()
  2. .map( elem ->
  3. [bind a prepared statement that restricts all the clustering columns, restrict the enum column, and restrict the collection column to contain "enum" ) )
  4. .map( session::executeAsync )
  5. .map( ResultSetFuture::getUninterruptibly )
  6. .peek( rs -> {
  7. // double check the result set we are getting back
  8. int bad = 0;
  9. for(Row row : rs ){
  10. if( [clustering columns of row satisfy the specified restriction] ){
  11. System.out.println( "LIFE'S GOOD" );
  12. } else {
  13. bad++;
  14. System.out.println( "LIFE SUCKS" );
  15. }
  16. }
  17. System.out.println( "This query fails " + bad + " times." );
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement