On Oct 5, 2:42 am, nchubrich <nchubr...@gmail.com> wrote:
> Shantanu---
>
> This looks great!  Can you compare it to ClojureQL?  Is it attempting
> to do more or less the same thing?  (Not sure what is happening with
> ClojureQL right now.)

Thanks, Nick. From what I understood after reading the blog post[1]
and the sources[2], ClojureQL builds a Clojure-oriented query language
for doing database stuff - the ClojureQL queries you write don't need
to change when you change the database. I think roughly speaking
ClojureQL is like Hibernate's HQL (plus query optimization - prepared
statements). On the contrary SQLRat does not try to build a common
language to talk to all databases - you rather use SQL clauses that
can be readily understood by the database. I guess ClojureQL is to
SQLRat what Hibernate/HQL is to SpringJDBC+primitive_O/R_mapping.

SQLRat uses the concept of database entities - entities can be related
to other entities and SQLRat provides API around that. I created
SQLRat considering the typical workflow for Domain Driven Design and I
was careful to avoid the abstraction-leakiness (that's why didn't
consider state management or entity-identity management). My attempt
is to pick the good parts of O/R mapping (as per my experience) and
put them into SQLRat. ClojureQL does not deal with entities AFAICT.

So, the question is -- is SQLRat doing more or less the same thing as
ClojureQL? Partly "yes", but mostly "no". There are big parts in both
SQLRat and ClojureQL that are orthogonal, and if ClojureQL can provide
database-agnostic query language at an SQL-clause level (maybe it
already does, I am not sure) rather than constructing only complete
queries I think SQLRat and ClojureQL can be a good combination for
doing database stuff.

By the way, SQLRat 0.2 (release expected very soon) will have an SQL-
clause API[3] that is like Clojure DSL for SQL but then the intent is
not to enable database-agnostic querying there.

[1] 
http://www.bestinclass.dk/index.clj/2009/12/clojureql-where-are-we-going.html
[2] git://gitorious.org/clojureql/clojureql.git
[3] http://bitbucket.org/kumarshantanu/sqlrat/wiki/Clause

Regards,
Shantanu

>
> Thanks,
>
> Nick.
>
> On Aug 31, 1:19 pm, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
>
>
>
> > SQLRat 0.1 GA is pushed to Clojars. Maven/Lein details 
> > here:http://clojars.org/org.bituf/sqlrat
>
> > The same is also reflected here:http://code.google.com/p/bitumenframework/
>
> > # Changes and TODO
>
> > ## 0.2 / planned
>
> > - [TODO] Support large sized query result-sets (by adding lazy loading
> > option)
> > - [TODO] Optimistic locks using time stamps
> > - [TODO] DSL for the WHERE clause
> > - [????] Add :groupby and :orderby arguments to find-xxx functions
>
> > ## 0.1 / 2010-Aug-31 (GMT + 5:30)
>
> > - Entity definitions, meta data, relations
> > - CRUD (Create, Retrieve, Update, Delete) functions for entities
> > - Small-to-medium sized query result-sets (eager-fetching is the only
> > option)
> > - Query by COUNT(*) function
> > - User can specify columns, WHERE clause in retrieve functions
> > - CRUD (Create, Retrieve, Update, Delete) functions for entity-
> > relations
> > - Avoid N+1 Select
>
> > Feel free to kick the tires and do share your experience/impression.
>
> > Regards,
> > Shantanu
>
> > On Aug 18, 11:38 pm, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
>
> > > Hi,
>
> > > I have uploaded source code (Apache 2 license) forSQLRat- a library
> > > for Clojure 1.2 to access relational databases using DataTypes
> > > (entities). It also lets you define relations between entities and
> > > navigate them. While this is a part of what typically Object-
> > > Relational Mapping (ORM) frameworks do, it is not an ORM framework per
> > > se -- it does not implement State managent, Identity management, Lazy
> > > loading, Eager fetching etc. The code is quite rough around the edges
> > > right now and beta-quality at best (at 0.1-SNAPSHOT), but it works
> > > nevertheless. I intend to release it as GA soon after Clojure 1.2 goes
> > > GA too.
>
> > > The source code is here:http://bitbucket.org/kumarshantanu/sqlrat/
>
> > > Discussions can be posted 
> > > here:http://groups.google.com/group/bitumenframework
>
> > > You may also like to keep a tab at 
> > > this:http://code.google.com/p/bitumenframework/
>
> > > The intent of this announcement is to gather feedback, so that I can
> > > fix as many warts as I can before doing a 0.1 GA release. It is not on
> > > Clojars yet, but the GA will eventually be there. The most important
> > > parts to review would be the API it exposes, followed by the
> > > implementation details. So, I would request you to give the library a
> > > try, ask questions (I would be happy to answer), give feedback, make
> > > suggestions and if you can, fork and contribute as well.
>
> > > The usage can be found in the dbblog.clj file, which contains the unit
> > > tests and describes how the library can be used.
>
> > > Regards,
> > > Shantanu

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to