Skip to content

Instantly share code, notes, and snippets.

@bsbodden
Created December 3, 2014 04:29
Show Gist options
  • Save bsbodden/a9f543097ca4c85c6715 to your computer and use it in GitHub Desktop.
Save bsbodden/a9f543097ca4c85c6715 to your computer and use it in GitHub Desktop.
HelloCassandra.java: Query1
session = cluster.connect("oink");
for (Row row : session.execute("SELECT oink_id, dateOf(oink_id), user_id, body FROM oinks")) {
System.out.println("========================================================");
System.out.println("OINK_ID: " + row.getUUID("oink_id"));
System.out.println("TIMESTAMP: " + row.getDate("dateOf(oink_id)"));
System.out.println("USER_ID: " + row.getString("user_id"));
System.out.println("BODY: " + row.getString("body"));
}
System.out.println("========================================================");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment