Created
December 6, 2012 16:52
-
-
Save samklr/4225989 to your computer and use it in GitHub Desktop.
Cassandra stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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