Permalink
Commits on Mar 1, 2011
  1. add transform method for modifying results on deref. implement pick u…

    …sing it. add tests for all of this.
    committed Mar 1, 2011
Commits on Feb 27, 2011
Commits on Feb 24, 2011
  1. Fixed issue where the order of the environment components was reverse…

    …d for joins
    
    Closes issue 70
    LauJensen committed Feb 24, 2011
Commits on Jan 27, 2011
  1. Fixed the compilation for aliased tables so that their names dont get…

    … subselected
    
    (table {:a :b})
    LauJensen committed Jan 27, 2011
Commits on Jan 25, 2011
Commits on Jan 21, 2011
  1. conj! now returns the last inserted ID as meta data

    clojureql.core> (meta (conj! (table db :users) {:name "Frank" :title "Dev"}))
    {:last-index 25}
    LauJensen committed Jan 21, 2011
  2. Changed URL in core.clj

    LauJensen committed Jan 21, 2011
Commits on Jan 20, 2011
  1. Added nil? operator

    LauJensen committed Jan 20, 2011
Commits on Jan 17, 2011
  1. Clarify order and semantics of how to connect to database

    Do away with in-connection* in favor of with-cnx, which is now the central point of responsibility for connections.
    Restucture with-cnx so that the order in which different connection methods are tried is clearly visible.
    bendlas committed Jan 17, 2011
Commits on Jan 15, 2011
Commits on Jan 13, 2011
Commits on Jan 12, 2011
  1. Fixed a monstrous bug which caused environments to be dropped between…

    … compile and build-join
    
    Example:
    
    (join (table :t2)
          (-> (table :t1)
          (select (where (= :title "Dev")))
          (aggregate [[:sum/wage :as :sum]] [:id])
          (select (where (<= :sum 50000)))) :id)
    SELECT t2.*,t1_subselect.id,t1_subselect.sum FROM t2 JOIN (SELECT t1.id,sum(t1.wage) AS sum FROM t1 WHERE (t1.title = ?) GROUP BY t1.id HAVING (t1.sum <= ?)) AS t1_subselect USING(id)
    
    Notice how the values for t1.title and t1.sum are questionmarks.
    LauJensen committed Jan 12, 2011
  2. Pushed another fix for qualifying fields in the ORDER BY clause.

    Still, we need to determine if a field is derrived from a subselect and
    if so - we should not qualify it.
    LauJensen committed Jan 12, 2011
  3. If you call select on a table with an aggregate and a group by you au…

    …tomatically get a HAVING clause.
    
    clojureql.core> (-> (table :t1)
                        (select (where (> :id 5)))
                        (aggregate [[:count/* :as :cnt]] [:id])
                        (select (where (> :id 5))))
    
    SELECT t1.id,count(*) AS cnt FROM t1 WHERE (t1.id > 5) GROUP BY t1.id HAVING (t1.id > 5)
    LauJensen committed Jan 12, 2011
  4. Stopped qualifying column names when sorting

    It broke aggregates since they dont belong to any table
    LauJensen committed Jan 12, 2011
Commits on Jan 11, 2011
  1. Predicates now carry information about their columns, such that they …

    …can always be qualified
    LauJensen committed Jan 11, 2011
Commits on Jan 7, 2011
  1. Fixed find-aliases to return a seq in the else clause as well. This

    fixes a bug when doing unions with an outer join. The column name
    returned as a string was treated as a sequence and each letter of the
    column name ended up as a separate column in the resulting SQL.
    r0man committed Jan 7, 2011
Commits on Jan 6, 2011
Commits on Jan 5, 2011
  1. Released ClojureQL 1.0

    LauJensen committed Jan 5, 2011
Commits on Jan 4, 2011
  1. Ensured that multiple calls to take spawns subselects

    clojureql.core> (-> (table :t1)
                        (take 10)
                        (take 5)
                        (take 2))
    
    SELECT * FROM (SELECT * FROM (SELECT t1.* FROM t1 LIMIT 10) LIMIT 5) LIMIT 2
    LauJensen committed Jan 4, 2011
Commits on Jan 3, 2011
  1. Allowed for aggregates to be strings, issue#44 revisisted

    clojureql.core> (project (table :x) [["avg(somecol / 2)" :as :good]])
    SELECT avg(somecol / 2) AS good FROM x
    LauJensen committed Jan 3, 2011
Commits on Jan 2, 2011
  1. tests for successful acceptance of duplicate columns and for absence …

    …of internal marker in result
    bendlas committed Jan 2, 2011
  2. When building result rows, use a marker keyword to detect cases when …

    …one duplicate column is NULL
    bendlas committed Jan 2, 2011