Permalink
Browse files

Readme and License.

  • Loading branch information...
1 parent 90b5201 commit ab24c20cf29021d69efcea394b47e3127e150a07 @mmcgrana committed Jan 1, 2010
Showing with 82 additions and 0 deletions.
  1. +22 −0 LICENSE
  2. +60 −0 README.md
View
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2009 Mark McGranaghan
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,60 @@
+# fleetdb-client
+
+A Clojure client library for FleetDB.
+
+## Usage
+
+Usage of the library is simple:
+
+ => (use 'fleetdb.client)
+ => (def client (connect "127.0.0.1" 3400))
+
+ => (query client ["ping"])
+ "pong"
+
+ => (query client ["select" "accounts" {"where" ["=" "id" 2]}])
+ [{"id" 2 "owner" "Alice" "credits" 150}]
+
+Keywords can be used in queries, as they are converted to strings before being sent to the server:
+
+ => (query client [:select :accounts {:where [:= :id 2]}])
+ [{"id" 2 "owner" "Alice" "credits" 150}]
+
+The client will raise an exception in the case of an error:
+
+ => (query client ["bogus"])
+ java.lang.Exception: Malformed query: unrecognized query type '"bogus"'
+
+
+## Setup
+
+If you are using [Leiningen](http//github.com/technomancy/leiningen), add `fleetdb-client` to your list of dependencies:
+
+ :dependencies [[fleetdb-client "0.1.0-SNAPSHOT"] ...]
+
+Then Leinegin will pull in the necessary jars when you run:
+
+ $ lein deps
+
+If you are using Maven, add the following to your configuration file:
+
+ <repository>
+ <id>clojars.org</id>
+ <url>http://clojars.org/repo</url>
+ </repository>
+
+ <dependency>
+ <groupId>fleetdb-client</groupId>
+ <artifactId>fleetdb-client</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
+
+If you are managing your dependencies in some other way, the necessary jars are:
+
+ * `fleetdb-client.jar`
+ * [`clj-json.jar`](http://github.com/mmcgrana/clj-json)
+ * [`jackson-core-asl-1.4.0.jar`](http://jackson.codehaus.org/)
+
+## License
+
+Copyright 2009 Mark McGranaghan and released under an MIT license.

0 comments on commit ab24c20

Please sign in to comment.