Re: Is Korma still a good current choice for DB backend?

2014-07-25 Thread Jason Coffin

Jason Coffin writes:

> This guide will help you setup connection pooling. It is general enough
> to be applied to anything that requires a db spec. And you will notice it
> that it isn't too difficult to setup.

Bah, I forgot to link to the guide! Haha, here it is:
http://clojure-doc.org/articles/ecosystem/java_jdbc/connection_pooling.html

-- 
Jason Coffin
www.jasoncoffin.com | ja...@jasoncoffin.com
617.869.0609

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


Re: Is Korma still a good current choice for DB backend?

2014-07-25 Thread Jason Coffin

Tony Tam writes:

> One benefit of using korma is that it uses a connection/statement pooling 
> library underneath (in this case c3p0), something that I don't think 
> yesql/honeysql do.

This guide will help you setup connection pooling. It is general enough
to be applied to anything that requires a db spec. And you will notice it
that it isn't too difficult to setup.

-- 
Jason Coffin
www.jasoncoffin.com | ja...@jasoncoffin.com
617.869.0609

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


Re: Is Korma still a good current choice for DB backend?

2014-07-25 Thread Scott Nielsen

On Jul 24, 2014, at 7:23 PM, Tony Tam  wrote:

> I've been using korma in a side-project for a while and it behaves well.
> There sure are a bunch of PRs on their github that could be merged, not sure 
> what's up with that.
> 
> One problem I ran into last week was that I got some conflicts when trying to 
> upgrade the versions of some dependencies.
> 
> One benefit of using korma is that it uses a connection/statement pooling 
> library underneath (in this case c3p0), something that I don't think 
> yesql/honeysql do.

Yesql is connection agnostic, so it will work with any connection that 
clojure.java.jdbc can work with, including a connection pool.

Scott Nielsen
> 
> 
> -- 
> 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
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Jonathon McKitrick
That's a handy feature, which I got running on my own to save a lot of
connection time in a batch process.  But it's probably easy enough to get
running on your own.


--
Jonathon McKitrick


On Thu, Jul 24, 2014 at 9:23 PM, Tony Tam  wrote:

> I've been using korma in a side-project for a while and it behaves well.
> There sure are a bunch of PRs on their github that could be merged, not
> sure what's up with that.
>
> One problem I ran into last week was that I got some conflicts when trying
> to upgrade the versions of some dependencies.
>
> One benefit of using korma is that it uses a connection/statement pooling
> library underneath (in this case c3p0), something that I don't think
> yesql/honeysql do.
>
>  --
> 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
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/rDyYHfC01RQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Tony Tam
I've been using korma in a side-project for a while and it behaves well.
There sure are a bunch of PRs on their github that could be merged, not 
sure what's up with that.

One problem I ran into last week was that I got some conflicts when trying 
to upgrade the versions of some dependencies.

One benefit of using korma is that it uses a connection/statement pooling 
library underneath (in this case c3p0), something that I don't think 
yesql/honeysql do.

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


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Brandon Bloom
>
> I think you mean (not date-range) and (not qualifier)? Otherwise you'll
> have (true OR ...) if the params are present... But that's a very neat
> trick!
>

Ah, yes, that's of course what I meant. Was wasting mental cycles on
parameter ordering... Use named parameters people!


> I ran it past our DBA and he verified that the execution plan definitely
> short-circuits the booleans with true / false (which was my initial concern
> after being somewhat gunshy of 'OR' in queries due to performance problems
> that has caused in complex queries).
>

You should also verify the `date < LEAST(NULL, MAX(date))` approach too. I
suspect that the query planner will summarily eliminate the aggregate.

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


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Sean Corfield
On Jul 23, 2014, at 6:34 PM, Brandon Bloom  wrote:
> SELECT ... main query stuff WHERE basic conditions
> AND (? OR dateUpdated >= ? AND dateUpdated < ?
> AND (? OR someColumn = ?)
> ...
> (query db basic params (boolean date-range) (or date-range (now)) (or 
> date-range (now)) (boolean qualifier) (or qualifier ""))

I think you mean (not date-range) and (not qualifier)? Otherwise you'll have 
(true OR ...) if the params are present... But that's a very neat trick!

I ran it past our DBA and he verified that the execution plan definitely 
short-circuits the booleans with true / false (which was my initial concern 
after being somewhat gunshy of 'OR' in queries due to performance problems that 
has caused in complex queries).

Thank you Brandon!

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Jony Hudson
Pressed send to eagerly! Relevant 
code: https://github.com/krisajenkins/yesql/blob/master/src/yesql/types.clj


Jony

On Thursday, 24 July 2014 12:58:27 UTC+1, Jony Hudson wrote:
>
>
> It passes the queries through clojure.java.jdbc, so provides the same 
> level of protection as that, as far as I am aware.
>
>
> Jony
>
>
> On Thursday, 24 July 2014 12:08:52 UTC+1, Paul Butcher wrote:
>>
>> I wasn’t aware of yesql - thanks for the pointer.
>>
>> My concern with “write your queries in pure SQL” is increased 
>> vulnerability to SQL injection. From a quick glance at yesql, it seems 
>> likely that it does provide protection against SQL injection, but there’s 
>> nothing in the documentation (that I can find at first glance, at least) 
>> that explicitly says so.
>>
>> Can anyone who understands it confirm or deny?
>>
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Jony Hudson

It passes the queries through clojure.java.jdbc, so provides the same level 
of protection as that, as far as I am aware.


Jony


On Thursday, 24 July 2014 12:08:52 UTC+1, Paul Butcher wrote:
>
> I wasn’t aware of yesql - thanks for the pointer.
>
> My concern with “write your queries in pure SQL” is increased 
> vulnerability to SQL injection. From a quick glance at yesql, it seems 
> likely that it does provide protection against SQL injection, but there’s 
> nothing in the documentation (that I can find at first glance, at least) 
> that explicitly says so.
>
> Can anyone who understands it confirm or deny?
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Paul Butcher
I wasn’t aware of yesql - thanks for the pointer.

My concern with “write your queries in pure SQL” is increased vulnerability to 
SQL injection. From a quick glance at yesql, it seems likely that it does 
provide protection against SQL injection, but there’s nothing in the 
documentation (that I can find at first glance, at least) that explicitly says 
so.

Can anyone who understands it confirm or deny?

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel
http://pragprog.com/book/pb7con

On 22 July 2014 at 14:08:20, Timothy Baldridge (tbaldri...@gmail.com) wrote:

Also, read the rationale behint yesql: https://github.com/krisajenkins/yesql 
IMO, it hits the nail on the head. ORMs are both crappy object systems and 
crappy DB DSLs. With a library like yesql you write your queries in pure SQL 
and get pure data back. Now you can fully leverage both SQL and Clojure. 

Timothy


On Tue, Jul 22, 2014 at 6:45 AM, Jonathon McKitrick  
wrote:
I'll keep that in mind when I decide to learn MongoDB.  :-)


On Tuesday, July 22, 2014 8:25:16 AM UTC-4, Robin Heggelund Hansen wrote:
Don't know about SQL-based solutions, but Monger (MongoDB bindings) just 
released a 2.0 update and is great!

kl. 14:10:16 UTC+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick følgende:
Development and support seem to have slowed down.  Are there newer or better 
choices out there with momentum right now?

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



--
“One of the main causes of the fall of the Roman Empire was that–lacking 
zero–they had no way to indicate successful termination of their C programs.”
(Robert Firth)
--
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
---
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-24 Thread Bobby Eickhoff
Slight tangent:  I've never used honeysql, but every time I see the name I 
want it to be pronounced "honeysuckle".  Is that the naming intent, or is 
it simply "honey s q l"?

On Tuesday, July 22, 2014 8:10:16 AM UTC-4, Jonathon McKitrick wrote:
>
> Development and support seem to have slowed down.  Are there newer or 
> better choices out there with momentum right now?
>
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Timothy Baldridge
I'll also mention that when I used to do C# and SQL I often found myself
often resorting to stored procs for high performance queries. Depending on
your SQL DB, you can often put quite a bit of conditional logic into the
queries, as long as that logic isn't executed row-by-row. Depending on how
advanced the query optimizer is you could often work with it to get good
performance with minimal hassle. But that was on MSSQL, so your milage may
vary.

Timothy


On Wed, Jul 23, 2014 at 11:54 AM, Sean Corfield  wrote:

> Yes, we're using HoneySQL extensively at World Singles for our more
> complex reporting queries - which was why I asked what Yesql users were
> doing to handle conditionally built queries.
>
> I really like the look of Yesql - and I can see the benefits for some of
> our more straightforward queries so I might give it a go at some point.
>
> Sean
>
> On Jul 23, 2014, at 4:56 AM, Colin Yates  wrote:
>
> Another very satisfied honeysql user here.  It matches this use case
> perfectly.
>
> On Wednesday, 23 July 2014 10:15:09 UTC+1, David Powell wrote:
>>
>> I'm using honeysql for constructing dynamic queries (eg conditionally
>> adding complex clauses).  It feels a bit more composable to me, and seemed
>> much easier to add the OR of several clauses to a query etc.
>>
>
>
>


-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

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


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Brandon Bloom
You could just add tests for extra params in OR clauses.

For example, instead of:

(str "SELECT ... main query stuff WHERE basic conditions"
> (when date-range (str " AND dateUpdated >= ? AND dateUpdated < ?"))
> (when qualifier " AND someColumn = ?"))
>

You do this:

SELECT ... main query stuff WHERE basic conditions
AND (? OR dateUpdated >= ? AND dateUpdated < ?
AND (? OR someColumn = ?)

Then instead of delegating to a bunch of different parameters, you just 
supply all the parameters all the time, using dummies where appropriate.

(if date-range
> (if qualifier
> (query-with-date-range-and-qualifier db basic params (first date-range) 
> (second date-range) qualifier)
> (query-with-date-range db basic params (first date-range) (second 
> date-range)))
> (if qualifier
> (query-with-qualifier db basic params qualifier)
> (query-basic db basic params)))
>

Example:

(query db basic params (boolean date-range) (or date-range (now)) (or 
date-range (now)) (boolean qualifier) (or qualifier ""))

You can actually do better than this too, but it will be database specific. 
For the date range example, Postgres has functions that can handle null and 
will optimize your query quite intelligently:

SELECT ... FROM orders WHERE date > GREATEST(MIN(date), ?) AND date < 
LEAST(MAX(date), ?)

That's even better because the query can now specify min and max dates 
separately without a combinatoric explosion of queries.

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


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Alexander Hudek
Ditto here. We use honeysql because we need to manipulate and parse SQL 
statements as part of a library for managing remote browser views.

On Wednesday, July 23, 2014 7:56:45 AM UTC-4, Colin Yates wrote:
>
> Another very satisfied honeysql user here.  It matches this use case 
> perfectly.
>
> On Wednesday, 23 July 2014 10:15:09 UTC+1, David Powell wrote:
>>
>> I'm using honeysql for constructing dynamic queries (eg conditionally 
>> adding complex clauses).  It feels a bit more composable to me, and seemed 
>> much easier to add the OR of several clauses to a query etc.
>>
>>
>>
>> On Tue, Jul 22, 2014 at 1:28 PM, Michael Klishin  
>> wrote:
>>
>>> On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmcki...@gmail.com) 
>>> wrote:
>>> > > Development and support seem to have slowed down. Are there
>>> > newer or better choices out there with momentum right now?
>>>
>>> Just use clojure.jdbc or clojure.java.jdbc with a validation library 
>>> (Validateur,
>>> Schema, Bouncer,  etc).
>>>
>>> There is no rush to use the newest hotness in the Clojure community so 
>>> Korma
>>> should work OK if that's what you want.
>>> --
>>> @michaelklishin, github.com/michaelklishin
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Sean Corfield
Yes, we're using HoneySQL extensively at World Singles for our more complex 
reporting queries - which was why I asked what Yesql users were doing to handle 
conditionally built queries.

I really like the look of Yesql - and I can see the benefits for some of our 
more straightforward queries so I might give it a go at some point.

Sean

On Jul 23, 2014, at 4:56 AM, Colin Yates  wrote:
> Another very satisfied honeysql user here.  It matches this use case 
> perfectly.
> 
> On Wednesday, 23 July 2014 10:15:09 UTC+1, David Powell wrote:
> I'm using honeysql for constructing dynamic queries (eg conditionally adding 
> complex clauses).  It feels a bit more composable to me, and seemed much 
> easier to add the OR of several clauses to a query etc.




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Colin Yates
Another very satisfied honeysql user here.  It matches this use case 
perfectly.

On Wednesday, 23 July 2014 10:15:09 UTC+1, David Powell wrote:
>
> I'm using honeysql for constructing dynamic queries (eg conditionally 
> adding complex clauses).  It feels a bit more composable to me, and seemed 
> much easier to add the OR of several clauses to a query etc.
>
>
>
> On Tue, Jul 22, 2014 at 1:28 PM, Michael Klishin  > wrote:
>
>> On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmcki...@gmail.com 
>> ) wrote:
>> > > Development and support seem to have slowed down. Are there
>> > newer or better choices out there with momentum right now?
>>
>> Just use clojure.jdbc or clojure.java.jdbc with a validation library 
>> (Validateur,
>> Schema, Bouncer,  etc).
>>
>> There is no rush to use the newest hotness in the Clojure community so 
>> Korma
>> should work OK if that's what you want.
>> --
>> @michaelklishin, github.com/michaelklishin
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Pierre-Yves Ritschard
For the record, I never ran in any structural issue when working with
clojure.java.jdbc and clojure.java.jdbc.sql. It lets you write clean and
composable queries and removes takes care of the essential (escaping and
the like).




On Wed, Jul 23, 2014 at 11:14 AM, David Powell 
wrote:

> I'm using honeysql for constructing dynamic queries (eg conditionally
> adding complex clauses).  It feels a bit more composable to me, and seemed
> much easier to add the OR of several clauses to a query etc.
>
>
>
> On Tue, Jul 22, 2014 at 1:28 PM, Michael Klishin <
> michael.s.klis...@gmail.com> wrote:
>
>> On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmckitr...@gmail.com)
>> wrote:
>> > > Development and support seem to have slowed down. Are there
>> > newer or better choices out there with momentum right now?
>>
>> Just use clojure.jdbc or clojure.java.jdbc with a validation library
>> (Validateur,
>> Schema, Bouncer,  etc).
>>
>> There is no rush to use the newest hotness in the Clojure community so
>> Korma
>> should work OK if that's what you want.
>> --
>> @michaelklishin, github.com/michaelklishin
>>
>> --
>> 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
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@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" 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread David Powell
I'm using honeysql for constructing dynamic queries (eg conditionally
adding complex clauses).  It feels a bit more composable to me, and seemed
much easier to add the OR of several clauses to a query etc.



On Tue, Jul 22, 2014 at 1:28 PM, Michael Klishin <
michael.s.klis...@gmail.com> wrote:

> On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmckitr...@gmail.com)
> wrote:
> > > Development and support seem to have slowed down. Are there
> > newer or better choices out there with momentum right now?
>
> Just use clojure.jdbc or clojure.java.jdbc with a validation library
> (Validateur,
> Schema, Bouncer,  etc).
>
> There is no rush to use the newest hotness in the Clojure community so
> Korma
> should work OK if that's what you want.
> --
> @michaelklishin, github.com/michaelklishin
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-23 Thread Islon Scherer
Sean, that was exactly what we did when we changed to yesql. With separated 
queries our Postgres specialist could optimize each query separately, and 
for the if nesting we used cond or core.match. Even with all the 
boilerplate of maintaining separated queries it was still much better than 
Korma limited DSL. How much better yesql was compared to raw 
clojure.java.jdbc was an open question though.

On Wednesday, July 23, 2014 4:35:14 AM UTC+2, Sean Corfield wrote:
>
> I'm curious as to how folks using Yesql deal with conditional queries - 
> which is something we seem to run into a lot.
>
> For example, we have some business logic that might optionally be passed a 
> date range and maybe some other qualifier so our query would be:
>
> (str "SELECT ... main query stuff WHERE basic conditions"
> (when date-range (str " AND dateUpdated >= ? AND dateUpdated < ?"))
> (when qualifier " AND someColumn = ?"))
>
> and then some conditions to build the parameters:
>
> (cond-> basic-params
> date-range (concat date-range)
> qualifier (concat [qualifier]))
>
> It seems like with Yesql we'd have to have four different query functions 
> and then code like this:
>
> (if date-range
> (if qualifier
> (query-with-date-range-and-qualifier db basic params (first date-range) 
> (second date-range) qualifier)
> (query-with-date-range db basic params (first date-range) (second 
> date-range)))
> (if qualifier
> (query-with-qualifier db basic params qualifier)
> (query-basic db basic params)))
>
> Sean
>
> On Jul 22, 2014, at 6:08 AM, Timothy Baldridge  > wrote:
>
> Also, read the rationale behint yesql: 
> https://github.com/krisajenkins/yesql IMO, it hits the nail on the head. 
> ORMs are both crappy object systems and crappy DB DSLs. With a library like 
> yesql you write your queries in pure SQL and get pure data back. Now you 
> can fully leverage both SQL and Clojure. 
>
>
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Sean Corfield
I'm curious as to how folks using Yesql deal with conditional queries - which 
is something we seem to run into a lot.

For example, we have some business logic that might optionally be passed a date 
range and maybe some other qualifier so our query would be:

(str "SELECT ... main query stuff WHERE basic conditions"
(when date-range (str " AND dateUpdated >= ? AND dateUpdated < 
?"))
(when qualifier " AND someColumn = ?"))

and then some conditions to build the parameters:

(cond-> basic-params
date-range (concat date-range)
qualifier (concat [qualifier]))

It seems like with Yesql we'd have to have four different query functions and 
then code like this:

(if date-range
(if qualifier
(query-with-date-range-and-qualifier db basic params 
(first date-range) (second date-range) qualifier)
(query-with-date-range db basic params (first 
date-range) (second date-range)))
(if qualifier
(query-with-qualifier db basic params qualifier)
(query-basic db basic params)))

Sean

On Jul 22, 2014, at 6:08 AM, Timothy Baldridge  wrote:
> Also, read the rationale behint yesql: https://github.com/krisajenkins/yesql 
> IMO, it hits the nail on the head. ORMs are both crappy object systems and 
> crappy DB DSLs. With a library like yesql you write your queries in pure SQL 
> and get pure data back. Now you can fully leverage both SQL and Clojure. 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
I'm sold.  I don't know what I was thing, lol.

I used straight SQL for the last 3 projects, so why change now?


--
Jonathon McKitrick


On Tue, Jul 22, 2014 at 7:42 PM, Nick Jones <
whatsyourproblemkazan...@gmail.com> wrote:

> Agreed, any lib that just lets me use raw sql for queries gets the + 1.
>
> --
> 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
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/rDyYHfC01RQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@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" 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Nick Jones
Agreed, any lib that just lets me use raw sql for queries gets the + 1.

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Craig
+1

On Tuesday, July 22, 2014 11:08:21 PM UTC+10, tbc++ wrote:
>
> Also, read the rationale behint yesql: 
> https://github.com/krisajenkins/yesql IMO, it hits the nail on the head. 
> ORMs are both crappy object systems and crappy DB DSLs. With a library like 
> yesql you write your queries in pure SQL and get pure data back. Now you 
> can fully leverage both SQL and Clojure. 
>
> Timothy
>
>
> On Tue, Jul 22, 2014 at 6:45 AM, Jonathon McKitrick  > wrote:
>
>> I'll keep that in mind when I decide to learn MongoDB.  :-)
>>
>>
>> On Tuesday, July 22, 2014 8:25:16 AM UTC-4, Robin Heggelund Hansen wrote:
>>>
>>> Don't know about SQL-based solutions, but Monger (MongoDB bindings) just 
>>> released a 2.0 update and is great!
>>>
>>> kl. 14:10:16 UTC+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick 
>>> følgende:

 Development and support seem to have slowed down.  Are there newer or 
 better choices out there with momentum right now?

  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> “One of the main causes of the fall of the Roman Empire was that–lacking 
> zero–they had no way to indicate successful termination of their C 
> programs.”
> (Robert Firth) 
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Timothy Baldridge
Also, read the rationale behint yesql: https://github.com/krisajenkins/yesql
IMO, it hits the nail on the head. ORMs are both crappy object systems and
crappy DB DSLs. With a library like yesql you write your queries in pure
SQL and get pure data back. Now you can fully leverage both SQL and
Clojure.

Timothy


On Tue, Jul 22, 2014 at 6:45 AM, Jonathon McKitrick 
wrote:

> I'll keep that in mind when I decide to learn MongoDB.  :-)
>
>
> On Tuesday, July 22, 2014 8:25:16 AM UTC-4, Robin Heggelund Hansen wrote:
>>
>> Don't know about SQL-based solutions, but Monger (MongoDB bindings) just
>> released a 2.0 update and is great!
>>
>> kl. 14:10:16 UTC+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick
>> følgende:
>>>
>>> Development and support seem to have slowed down.  Are there newer or
>>> better choices out there with momentum right now?
>>>
>>>  --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
I'll keep that in mind when I decide to learn MongoDB.  :-)

On Tuesday, July 22, 2014 8:25:16 AM UTC-4, Robin Heggelund Hansen wrote:
>
> Don't know about SQL-based solutions, but Monger (MongoDB bindings) just 
> released a 2.0 update and is great!
>
> kl. 14:10:16 UTC+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick følgende:
>>
>> Development and support seem to have slowed down.  Are there newer or 
>> better choices out there with momentum right now?
>>
>>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Jonathon McKitrick
I liked the no-fuss integration of relationships for the particular project 
I'm working on.  I could live without it, but it would greatly simplify the 
code on server side.

On Tuesday, July 22, 2014 8:29:13 AM UTC-4, Michael Klishin wrote:
>
> On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmcki...@gmail.com 
> ) wrote: 
> > > Development and support seem to have slowed down. Are there   
> > newer or better choices out there with momentum right now? 
>
> Just use clojure.jdbc or clojure.java.jdbc with a validation library 
> (Validateur, 
> Schema, Bouncer,  etc). 
>
> There is no rush to use the newest hotness in the Clojure community so 
> Korma 
> should work OK if that's what you want. 
> --   
> @michaelklishin, github.com/michaelklishin 
>

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Michael Klishin
On 22 July 2014 at 16:10:31, Jonathon McKitrick (jmckitr...@gmail.com) wrote:
> > Development and support seem to have slowed down. Are there  
> newer or better choices out there with momentum right now?

Just use clojure.jdbc or clojure.java.jdbc with a validation library 
(Validateur,
Schema, Bouncer,  etc).

There is no rush to use the newest hotness in the Clojure community so Korma
should work OK if that's what you want.
--  
@michaelklishin, github.com/michaelklishin

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


Re: Is Korma still a good current choice for DB backend?

2014-07-22 Thread Robin Heggelund Hansen
Don't know about SQL-based solutions, but Monger (MongoDB bindings) just 
released a 2.0 update and is great!

kl. 14:10:16 UTC+2 tirsdag 22. juli 2014 skrev Jonathon McKitrick følgende:
>
> Development and support seem to have slowed down.  Are there newer or 
> better choices out there with momentum right now?
>
>

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