Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
-*- 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)

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.