Fetching contributors…
Cannot retrieve contributors at this time
38 lines (22 sloc) 1.17 KB

Rotary

A Clojure client for Amazon's DynamoDB database.

Installation

Add the following dependency to your Clojure project:

[org.clojars.crowdflower/rotary "0.4.1"]

Simple Example

(def aws-credential {:access-key "myAccessKey", :secret-key "mySecretKey"})
(get-item aws-credential "MyTable" "somePrimaryKey")
(query aws-credential "AnotherTable" 22 `(> 13392) :limit 100 :count true)
(update-item aws-credential "MyFavoriteTable" [36 263] {"awesomeness" [:add 20] "updated" [:put 1339529420]})
(put-item aws-credential "RandomTable" {"myHashKey" 777 "theRangeKey" 3843 "someOtherAttribute" 33} :return-values "ALL_OLD")

Documentation

Testing

Run tests using AMAZON_SECRET_ID=MySecretID AMAZON_SECRET_ACCESS_KEY=SomeVerySecretAccessKey lein test

The test suite creates a minimal table to test against and attempts to clean it up afterwards

License

Copyright (©) 2012 James Reeves
Modifications (©) 2012 Matthew Gordon (CrowdFlower)
Modifications (©) 2012 Ivan Toshkov

Distributed under the Eclipse Public License, the same as Clojure.