Re: ANN: ClojureQL 1.0.0 now released

2011-01-10 Thread LauJensen
You're very welcome - and thanks to everybody who's tried it out! Lau Tim Robinson wrote: > Thank you for making this. > It's a great idea and really enjoyable to use. > Tim > > On Jan 5, 7:14 am, LauJensen wrote: > > Hey everybody, > > > > Just a quick heads up that ClojureQL 1.0.0 is now relea

Re: ANN: ClojureQL 1.0.0 now released

2011-01-08 Thread Tim Robinson
Thank you for making this. It's a great idea and really enjoyable to use. Tim On Jan 5, 7:14 am, LauJensen wrote: > Hey everybody, > > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Works out of > the box with PostgreSQL a

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Sean Corfield
On Fri, Jan 7, 2011 at 3:23 AM, LauJensen wrote: > Half right - It will compile everytime, but not necessary create the > AST everytime: > > (let [my-table (-> (table :user) >    (select (where (= :id user-id))) >    (project [:dateofbirth :gender :zipcode]))] >  (repeatedly @my-table)) Interesti

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Feng
On Jan 7, 7:36 pm, Rick Mouritzen wrote: > A prepared statement is something inside a database. The true object > isn't part of JDBC or a JDBC driver. Some JDBC drivers and JEE Datasources (all Oracle and IBM products) do cache stmt per connection (i.e. stmt.close() doesn't really close it, jus

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Rick Mouritzen
A prepared statement is something inside a database. The true object isn't part of JDBC or a JDBC driver. So you open a connection, then create your SQL using JDBC's PreparedStatement to tell the DB to use a prepared statement. Next time that same SQL is used with another JDBC PreparedStatement, t

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Feng
I'd suggest ClojureQL only optimize lisp form to SQL text transformation, and provide options whether to use PreparedStatement or not. Leave other kind of optimizations to databases/drivers. Some thoughts below: - PreparedStatement avoids high cost of frequent query planning (oracle call it hard

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread LauJensen
Hi Sean, Half right - It will compile everytime, but not necessary create the AST everytime: (let [my-table (-> (table :user) (select (where (= :id user-id))) (project [:dateofbirth :gender :zipcode]))] (repeatedly @my-table)) However I see there are some good thoughts on optimization

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread Shantanu Kumar
On Jan 7, 10:32 am, Ken Wesson wrote: > On Fri, Jan 7, 2011 at 12:22 AM, Shantanu Kumar > > wrote: > > On Jan 7, 6:49 am, Ken Wesson wrote: > >> I'd hope it has some kind of caching or memoization behind the scenes, > >> but if not, that'd be a great thing to add for version 1.1. I think a > >

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread Ken Wesson
On Fri, Jan 7, 2011 at 12:22 AM, Shantanu Kumar wrote: > On Jan 7, 6:49 am, Ken Wesson wrote: >> I'd hope it has some kind of caching or memoization behind the scenes, >> but if not, that'd be a great thing to add for version 1.1. I think a >> typical database client app uses a finite variety of

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread Shantanu Kumar
On Jan 7, 6:49 am, Ken Wesson wrote: > On Thu, Jan 6, 2011 at 7:33 PM, Sean Corfield wrote: > > On Thu, Jan 6, 2011 at 2:33 AM, LauJensen wrote: > >> Yes the two statements are equivalent. ClojureQL compiles everything > >> to prepared > >> statements, with every argument automatically paramte

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread Ken Wesson
On Thu, Jan 6, 2011 at 7:33 PM, Sean Corfield wrote: > On Thu, Jan 6, 2011 at 2:33 AM, LauJensen wrote: >> Yes the two statements are equivalent. ClojureQL compiles everything >> to prepared >> statements, with every argument automatically paramterized. > > Cool, that's what I'd hoped. But just t

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread Sean Corfield
On Thu, Jan 6, 2011 at 2:33 AM, LauJensen wrote: > Yes the two statements are equivalent. ClojureQL compiles everything > to prepared > statements, with every argument automatically paramterized. Cool, that's what I'd hoped. But just to clarify... If I have code that repeatedly calls this: @(->

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread LauJensen
Thanks! sqlite has certain oddities. For instance when you do a union the first query must not be in parens. In order to support this various quirks, somebody would have to copy/paste the sql92compiler and adjust it slightly for sqlite. I haven't done it yet, but if somebody does I'd be happy to i

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread faenvie
On Jan 5, 3:14 pm, LauJensen wrote: > ... Works out of the box with PostgreSQL and MySQL ... nice work ! your testcode references sqlite3 too. so what about sqlite3-support ? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: ANN: ClojureQL 1.0.0 now released

2011-01-06 Thread LauJensen
Hi Sean, Yes the two statements are equivalent. ClojureQL compiles everything to prepared statements, with every argument automatically paramterized. You shouldn't have to call the compiler function directly, ever. For quick inspection, simply type the statement in the repl and it will emit the SQ

Re: ANN: ClojureQL 1.0.0 now released

2011-01-05 Thread Sean Corfield
On Wed, Jan 5, 2011 at 6:14 AM, LauJensen wrote: > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Looks really interesting. We're about to start moving some of our web app back end over to Clojure and this might be a good

Re: ANN: ClojureQL 1.0.0 now released

2011-01-05 Thread Nicolas Buduroi
Congratulation, you've finally made it! P.S.: Nice job on the website! On Jan 5, 9:14 am, LauJensen wrote: > Hey everybody, > > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Works out of > the box with PostgreSQL and MyS