Plans for Korma

294 views
Skip to first unread message

Alex Baranosky

unread,
Jan 13, 2013, 8:40:14 PM1/13/13
to Korma
Just to keep you all in the loop, these are my current plans for Korma:

1. Come up with a solution for accepting more varieties of connection information.  Ideally accept anything that java.jdbc accepts.  This would mark a release of korma-0.3.0
2. Add korma.schema, like what Chris started in incubator, and then release that as korma-1.0.0

I'll address bugs as they come up, but these will be the two pieces of feature work that I'll be attacking.

Alex

Josh Tilles

unread,
Jan 14, 2013, 11:15:32 AM1/14/13
to sqlk...@googlegroups.com
Sounds great! Just one question: does that mean I should hold off on bringing up a couple of small features/changes? I'd been meaning to post about them in the mailing list but hadn't gotten around to it. (I.e., if they'd be unwelcome distractions, I am happy to discuss them later, or submit a pull request after 1.0)
--Josh

Alex Baranosky

unread,
Jan 14, 2013, 12:03:37 PM1/14/13
to sqlk...@googlegroups.com

Hi Josh,

No need to hold off.

Josh Tilles

unread,
Jan 23, 2013, 6:34:23 PM1/23/13
to sqlk...@googlegroups.com
  1. I often wish that a query with no results be nil, rather than [], the empty vector. It's not hard to work around, but there were a few cases where I forgot to and was surprised that it wasn't a lazy sequence. (Making query results genuinely lazy would be a totally separate topic!) This has particularly burned me when I "parameterize" a query by wrapping a function around it, and then use that function in an if-let form. What do you think? Would it be a bad idea to have Korma apply clojure.core/not-empty to every query result?
  2. Sometimes, I want the query result to be the full dataset-structure: a vector of maps, which resembles a set of tuples. However, many times I also just want a sequence of values, or even a single value from a query. Like the above feature request idea, I acknowledge it's not hard to work around for a given application. I'm not sure what the name would/should be for the sequence of values, but I'm partial to the word "pluck" for the extraction of a single (scalar) value from the query: https://www.refheap.com/paste/8908. So again: what do you think? It seems like the new functions could be appropriate in korma.core.incubator.

I really, really appreciate the work you're putting into Korma, and think that the issues you've been tackling first have been the right ones. I guess I just wanted to throw these ideas into the pot before 1.0.0 crystallizes =)

--Josh

Stathis Sideris

unread,
Apr 8, 2013, 9:14:01 AM4/8/13
to sqlk...@googlegroups.com
Hello,

Just wanted to ask whether it's in the plans to separate the query-generation and query execution aspects of Korma.

Thanks,

Stathis

John Cromartie

unread,
Apr 8, 2013, 1:21:57 PM4/8/13
to sqlk...@googlegroups.com
I think you could just apply seq to the result. There's really no reason to care if it's a vector, is there?

Alex Baranosky

unread,
Apr 8, 2013, 2:40:50 PM4/8/13
to Korma
Stathis,

Query creation is already separate from execuation.

(def q (-> (select* users) 
                (where {:username "Bob"}))

(exec q)
=> [{:username "Bob" ...}]


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

Jonathan M.

unread,
Apr 10, 2013, 12:47:36 PM4/10/13
to sqlk...@googlegroups.com
Hello,

I would also like to ask something regarding future plans. 

Is there a possibility to support table joins instead of two separate queries as the docs state when has-many is used? For example, it would be nice if we could produce queries like the following using select fn in combination with the with fn

SELECT * from table_B 
INNER JOIN mapping ON table_B.id = mapping.table_B.id
INNER JOIN table_A ON mapping.table_A.id = table_A.id
WHERE table_A.some-column = some-value

I hope i made the above clear enough. 

Thank you for your time

Alex Baranosky

unread,
Apr 10, 2013, 1:37:44 PM4/10/13
to Korma
At the moment, I don't have plans to add any features in the near future because of lack of time.  I actually am struggling to find to time to incorporate very good work being done by others in their excellent pull requests.  (I am struggling to find time, but *will* do so; so don't worry guys :) )

I recommend that if this feature is dear to you, that you submit a pull request with code and tests.

Jonathan M.

unread,
Apr 10, 2013, 1:47:39 PM4/10/13
to sqlk...@googlegroups.com
Thanks for your reply Alex. I need to get other stuff rolling before I can submit a pull request but if the feature won't be there when I get some free time I will gladly make that pull request for you :)

Cheers

Aaron Craelius

unread,
Apr 30, 2013, 3:30:49 PM4/30/13
to sqlk...@googlegroups.com
Hi Alex, I'm just wondering if you would consider calling what will be korma-0.3.0, korma-1.0.0 instead to follow the semantic versioning specification (http://semver.org/)?  The reason for this would be that a lot of people are already using korma in production (see the semantic versioning FAQ).  If adding korma.schema would just be an incremental improvement but wouldn't break backwards compatibility, why not call that version korma-1.1.0?  Just a little suggestion.  For myself, I'm trying to maintain the ClojureCLR port of Korma (https://github.com/aaronc/Korma.net) and would like to release a 0.3.0 or 1.0 release whenever Korma creates its production release.

Thanks!
Reply all
Reply to author
Forward
0 new messages