Random thought: recursive queries are possible in SQL using recursive common 
table expressions.  The PostgreSQL manual has a good introduction to them:

http://www.postgresql.org/docs/9.1/static/queries-with.html

And another introduction to them, in the particular area of querying 
hierarchical data using recursive CTEs:

http://explainextended.com/2009/07/17/postgresql-8-4-preserving-order-for-hierarchical-query/

Cheers,

- Chas

On Jun 26, 2012, at 8:26 AM, Niels van Klaveren wrote:

> Yeah, it's a pain to include Datomic's Datalog implementation through Maven 
> dependencies, since you need to install the jar by hand. Afaik 
> clojure.contrib.datalog didn't compile to SQL. Theoretically it should be 
> possible to do so, since Datalog is a superset of SQL. However, the extra 
> functionality in Datalog would be hard to implement in SQL (for instance, 
> recursive queries), and result in a lot of not very optimal SQL queries.
> 
> On Tuesday, June 26, 2012 11:45:15 AM UTC+2, mnicky wrote:
> Thanks! However it'd be nice if it was released as a separate library.
> 
> Also, I thought that clojure.contrib.datalog worked for SQL queries... That 
> would be even better ;)
> 
> On Monday, June 25, 2012 1:50:19 PM UTC+2, Niels van Klaveren wrote:
> You can use the Datomic datalog implementation to query Clojure collections. 
> I think this is the same use clojure.contrib.datalog had.
> 
> On Monday, June 25, 2012 12:47:29 PM UTC+2, mnicky wrote:
> 
> 
> On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren wrote:
>  
> I was thinking if an SQL generation DSL / library could be based on 
> core.logic ? 
>  
> Something like revival of clojure.contrib.datalog would be great.

-- 
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