Skip to content

Instantly share code, notes, and snippets.

@maiha
Created May 10, 2010 08:50
Show Gist options
  • Save maiha/395829 to your computer and use it in GitHub Desktop.
Save maiha/395829 to your computer and use it in GitHub Desktop.
import cassandra._
val storage = Storage()
// => storage: cassandra.Storage = cassandra.Storage@cabe02e
storage("key") // => ""
storage("key") = "aho" // Unit
storage("key") // => "aho"
storage("key:field") // => ""
storage("key:field") = "aho2" // Unit
storage("key:field") // => "aho2"
storage("key", "field") // => "aho2"
storage("key", "field") = "aho3" // Unit
storage("key", "field") // => "aho3"
storage("key:field") // => "aho3"
% cassandra-cli --host localhost --port 9160
cassandra> get Keyspace1.Standard2['key']['field']
=> (column=field, value=aho3, timestamp=1273480994951)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment