Skip to content

Instantly share code, notes, and snippets.

@samklr samklr/Cass.java
Created Dec 6, 2012

Embed
What would you like to do?
Cassandra stuff
// Instanciate cluster then connect
Cluster cluster =new Cluster.Builder()
.addContactPoints( addr1, addr2)
.build()
Session session = cluster.connect()
session.execute(query)
//read
ResultSet rs = session.execute(readQuery) // select *****
List<CQLRow> rw = rs.fetchAll
val userList = rw map ( row : CQLROW => User(row.getString( stringName), ....)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.