Permalink
Browse files

Update readme with adapter and method option info.

  • Loading branch information...
1 parent 02ac1ce commit 030d470b6b6680dfdc25ec5f3a70b947d6fb8013 @jnunemaker committed Nov 16, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
@@ -29,6 +29,14 @@ client = apps
adapter = Adapter[:cassanity].new(client)
adapter.clear
+# you can also set options for the adapter
+using = {using: {consistency: :quorum}}
+adapter = Adapter[:cassanity].new(client, {
+ read: using, # read using quorum consistency
+ write: using, # write using quorum consistency
+ delete: using, # delete using quorum consistency
+})
+
id = CassandraCQL::UUID.new
adapter.read(id) # => nil
@@ -44,6 +52,10 @@ adapter.read(id) # => {'id' => ..., 'name' => 'GitHub'}
adapter.clear
adapter.read(id) # => nil
+
+# You can also override adapter options per method:
+# This will perform read with consistency set to ONE.
+adapter.read(id, using: {consistency: :one})
```
## Installation

0 comments on commit 030d470

Please sign in to comment.