Age | Commit message (Collapse) | Author |
|
|
|
|
|
Previously the union/intersection operations didn't work when you tried to
select/project/sort/drop/whatever on them. Now they just automatically
introduce a subquery, which means that they can be used in other operations
automatically. (There is a potential for a minor decrease in query speed, but I
think it's worthwhile to maintain the abstraction.)
|
|
|
|
- it looked ridiculous
|
|
|
|
|
|
|
|
|
|
|
|
The `having` function duplicated the intended functionality of `select`, but in
a bad way. It only applied to a restricted case, and its existence meant that
`select` provided an escape-hatch with which we could cause some unexpected
behaviour. By consolidating the two functions into `select` we remove the
escape hatch as well as simplify the model.
Selection on grouped queries may now introduce a new subquery, but only in
situations where the behaviour is unpredictable (ie. selecting on non-grouped
attributes).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the compiler there was one call to `table-name` which should have been
`field-name`.
|
|
|
|
Add take and drop functionality to the queries, so now you can use the take and
drop functions in a similar way to how they work on seqs in clojure.
Move jdbc interface stuff into clojure-sql.jdbc, so if you're using jdbc you
can include it yourself. (If you're not using jdbc then it shouldn't bother
you).
Given the default compilation target is actually postgres, document that.
|
|
|
|
Fix compilation of cross joins.
Remove the sort clauses on queries when they become subqueries in joins because
then the sorting means nothing (although when take/drop stuff is added the sort
will be relevant, so we'll see about that).
Favour the left side of a join, which is mostly only relevant for the outer
join case (and technically it's not quite right for full-outer joins, maybe,
but I'll get to that later).
|
|
|
|
The parameters should be passed in the `rest` of the vector, not as a separate
seq. My bad.
|
|
|
|
Need to fix up the compilation to return a query ready for value substitution
by the jdbc stuff, or something (rather than embedding parameters in the
query).
Also need to add insert!, update! and delete! functions.
|
|
|