Preferred methods of interacting with sql db's

16 views
Skip to first unread message

Evan Niessen-Derry

unread,
Jul 22, 2015, 2:58:48 PM7/22/15
to cloj...@googlegroups.com
Hey All,

I'm currently working on a project to take wikimedia dumps and insert them into sql db's,
and I'm curious what everyone's preferred method of working with sql is.

Currently I'm looking at Korma[1], which is a dsl, and while I'm wrapping my head around
that, one of the things I'm envisioning is being able to seamlessly insert a map into sql,
where keywords are columns and values are, well, values.

That being said, I have no experience in this so I'm not really certain how plausible that
is and I would love feedback on what others have done w.r.t sql.

Thanks,
Evan

[1]http://sqlkorma.com/

Michael Cameron

unread,
Jul 22, 2015, 3:16:43 PM7/22/15
to cloj...@googlegroups.com
I've used Korma on production projects and initially picked it over HoneySQL (https://github.com/jkk/honeysql) and yesql (https://github.com/krisajenkins/yesql). However, I'm leaning more towards Honey SQL now, primarily because of Korma's coupling to the database connection and pool. It's bundled with C3P0, a fairly old and now undesirable connection pool, and you can't get just the SQL portion of Korma without all of the other stuff (there are calls to get the SQL string, but it's still parameterized at that point). It would be nice to separate the SQL generation from the connection to the DB and use best in class approaches for both.

There have also been some queries that I have not been able to create with Korma's DSL that I think would have been possible with HoneySQL. 

I have a friend who has used yesql on a side project and really liked it, but I think it too is tied to the connection mechanism underneath.

Michael


--
You received this message because you are subscribed to the Google Groups "clojure.mn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojuremn+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Bailey

unread,
Jul 22, 2015, 3:22:04 PM7/22/15
to cloj...@googlegroups.com
I've had similar experiences with Korma and like YeSQL quite a bit. They're basically opposite in ideology it seems. Korma is a full-featured DSL while YeSQL promotes raw SQL that gets automagically wrapped into Clojure functions.

YeSQL is definitely a solid choice if you have an existing bunch of SQL queries lying around and don't want to manually convert them all to a new DSL.

I can't remember why now, but I've steered clear of HoneySQL.

YMMV

Evan Niessen-Derry

unread,
Jul 23, 2015, 5:25:24 PM7/23/15
to cloj...@googlegroups.com
Thank you both, I'll be looking into all three of these options.

-E

On 07/22/2015 02:21 PM, Eric Bailey wrote:
> I've had similar experiences with Korma and like YeSQL quite a bit. They're basically
> opposite in ideology it seems. Korma is a full-featured DSL while YeSQL promotes raw SQL
> that gets automagically wrapped into Clojure functions.
>
> YeSQL is definitely a solid choice if you have an existing bunch of SQL queries lying
> around and don't want to manually convert them all to a new DSL.
>
> I can't remember why now, but I've steered clear of HoneySQL.
>
> YMMV
>
> On Jul 22, 2015, at 2:16 PM, Michael Cameron <michael....@gmail.com
>> "clojure.mn <http://clojure.mn>" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to
>> clojuremn+...@googlegroups.com
>> <mailto:clojuremn%2Bunsu...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "clojure.mn"
>> group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to
>> clojuremn+...@googlegroups.com <mailto:clojuremn+...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "clojure.mn" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> clojuremn+...@googlegroups.com <mailto:clojuremn+...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages