korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.47k stars 222 forks source link

Adds the ability to specify limit and offset options on union, union-all, and intersect. Adds the ability to alias joins against subselects #346

Closed ejschoen closed 5 years ago

ejschoen commented 8 years ago

This is based on the released 0.4.2 branch. I needed limit on union, so modified the engine code to invoke the sql-limit-offset code for union, union-all, and intersect.

I also needed joins of the form:

 (select .. from table1 join (select table2 where ...) as alias on table1.foo=alias.bar.`   

This commit adds the ability to use a subselect in a join, in a 2-vector, like for field and table aliases:

(select table1 (join :left [(subselect table2 (where {... })) alias] 
                     (= :table1.foo :alias.bar)))
ghost commented 5 years ago

@ejschoen There are "prod" credentials in this PR files.

ghost commented 5 years ago

Everything's still here oh my god !!

ejschoen commented 5 years ago

Yeah, they leaked in. Thanks.

ghost commented 5 years ago

Nothing to see here