Source

SQLRat / README

Full commit
kumarshantanu e0163b8 

shantanuk a1eec94 
kumarshantanu 282dde9 








kumarshantanu 4e4110e 
kumarshantanu 282dde9 






shantanuk a1eec94 
kumarshantanu 282dde9 











kumarshantanu e0163b8 


kumarshantanu 282dde9 






kumarshantanu e0163b8 

shantanuk a1eec94 
kumarshantanu e0163b8 
shantanuk a1eec94 
-*- markdown -*-

# SQLRat v0.2

SQLRat is a Clojure (v1.2 or later) library to access relational
databases using entity objects and to navigate entity relations
in a stateless manner. Easy to use and flexible - you can also
pass in native SQL for accessing the database.


## Usage

Maven/Leiningen dependency details are here: [http://clojars.org/org.bituf/sqlrat](http://clojars.org/org.bituf/sqlrat)

Examples for defining entities/relations and using them can be
found in the unit test cases. There is a bunch of API functions
to work using the entity definitions.

Unit tests:
src/test/clj/org/bituf/sqlrat/test/dbblog.clj
src/test/clj/org/bituf/sqlrat/test/clause.clj

Database configuration:
src/test/clj/org/bituf/sqlrat/test/dbconfig.clj


## Building/Installation

If you want to build from sources, you may need to setup a database
first. The default configuration points to MySQL database "sqlrat".

You will need Maven 2 to build from sources. Execute the following:

    $ mvn clean package  # packages up a JAR in "target" dir
    $ mvn install        # to install to your local Maven repo
    $ mvn clojure:gendoc # generate Clojure API documentation


## License

Copyright (C) 2010 Shantanu Kumar (kumar.shantanu at gmail dot com)

Distributed under the Apache 2 License.


## Tutorial

The tutorial for SQLRat is here:
[http://bitbucket.org/kumarshantanu/sqlrat/wiki/Tutorial](http://bitbucket.org/kumarshantanu/sqlrat/wiki/Tutorial)