Andrii V. Mishkovskyi
1ff93eb964
Adding stubs for future support of NULLS FIRST/LAST
2015-04-15 17:01:05 +02:00
Mike Blume
f410aed5a1
use a for loop
...
bit more readable
2015-04-01 12:32:42 -07:00
Mike Blume
d74f2d2437
Allow maps/vectors not to be read as subqueries
2015-03-26 22:59:47 -07:00
Mike Blume
48c501d2c4
break out SqlParam as its own ToSql instance
2015-03-26 22:23:16 -07:00
Mike Blume
a996b93dd3
pull out a couple helpers for param logic
2015-03-26 22:23:14 -07:00
Michael Blume
49096b59a4
Merge pull request #57 from MichaelBlume/avoid-reflection
...
avoid reflection
2015-03-16 12:45:55 -07:00
Mike Blume
ae7d42bd32
use case instead of condp
2015-03-16 12:32:30 -07:00
Mike Blume
c97f9a3a9d
avoid reflection
2015-03-15 23:32:41 -07:00
Michael Blume
4add0b49e2
Merge pull request #55 from MichaelBlume/params-merge
...
support postgres-native parameters
2015-03-15 22:29:50 -07:00
Michael Blume
f0be1d39ed
Merge pull request #52 from MichaelBlume/late-bind
...
late-bind custom readers
2015-03-15 12:46:01 -07:00
Mike Blume
27b906859d
simplify call to parameterizer
2015-03-15 11:03:07 -07:00
Mike Blume
7115456d9e
Merge remote-tracking branch 'upstream/master' into params-merge
2015-03-15 10:53:52 -07:00
Mike Blume
44a22e3787
format the format namespace a bit more nicely
2015-03-13 11:33:48 -07:00
Mike Blume
5329d020e6
late-bind custom readers
...
this much-less-invasively fixes the problem I was trying to fix in #48 .
In resources/data_readers.clj we direct clojure to use these functions
in honeysql.types to read tagged literals in EDN as SqlCalls, SqlRaws,
and SqlParams. Clojure does this by making a permanent binding to the
Vars for these functions which exist in honeysql.types when it starts
up. The trouble is that if someone is doing REPL-driven development
and calls clojure.tools.namespace.repl/refresh, those vars will be
wholely recreated, along with the deftype classes they point to.
This means that if there's a sql/call in a piece of edn we're reading,
we'll get an instance of the *old* SqlCall class, but if someone just
calls honeysql.types/call they'll get an instance of the *new* class.
These won't match up, and this'll cause some of the tests in core_tests
to fail.
This patch works around that by causing these custom reader functions
to resolve the helpers they call each time they are called, so we
always create instances of the new types if they've been redefined.
Again, this has basically zero effect on the end user, but it removes
a pain-point for someone using REPL-driven development to work on
honeysql itself.
2015-03-13 11:28:08 -07:00
Mike Blume
42c29506a0
Merge remote-tracking branch 'icambron/parameter-fns' into HEAD
2015-03-09 23:31:17 -07:00
Mike Blume
34f84e41b4
Merge remote-tracking branch 'dave/master' into HEAD
2015-03-09 09:56:11 -07:00
Dave Della Costa
11e6d1c017
Merge in Pull Request #34 , Support basic common table expressions.
2015-03-09 13:22:02 +09:00
Mike Blume
05e74d9f30
make clause order extensible
...
(by using atom registry)
2015-03-06 10:48:49 -08:00
Dave Della Costa
0f24df5ee0
supports extended INSERT INTO...SELECT syntax allowing specifying columns to insert into explicitly
2015-03-05 00:20:42 +09:00
Mike Blume
17145ea549
Merge remote-tracking branch 'justindell/master' into HEAD
2015-03-03 20:34:16 -08:00
Justin Dell
7fb92e0d93
fix merge-full-join
2015-03-03 22:25:50 -06:00
Michael Blume
12f73bfa5a
Merge pull request #40 from senior/add-cast-support
...
Added support for casts of the form CAST(foo AS type)
2015-03-03 20:18:21 -08:00
Michael Blume
a96b14267e
Merge pull request #38 from MichaelBlume/extend-to-object
...
extend ToSql to cover Object
2015-03-03 13:42:50 -08:00
Mike Blume
e06ddbdeb0
extend ToSql to cover Object
...
This commit avoids extraneous calls to satisfies?. Satisfies? is very
slow compared to protocol method dispatch, because method dispatch is
cached and satisfies? is not. Instead of using satisfies? to check for
cases where we need to fall back to a default behavior, we extend ToSql
to java.lang.Object, providing a default behavior directly.
This commit boosts honeysql's speed substantially. In my benchmarks,
80-90% of the time spent calling sql/format was spent in satisfies?.
2015-02-25 16:21:22 -08:00
Mike Blume
c736565bd5
avoid name collision with clojure.core/update
...
present in 1.7, currently in alpha
2015-02-25 16:15:53 -08:00
Ryan Senior
dd9647ee3e
Added support for casts of the form CAST(foo AS type)
2015-02-20 10:05:09 -06:00
Isaac Cambron
25ba952a3e
support postgres-native parameters
2015-01-06 19:58:56 -05:00
Justin Dell
f8a5886124
Add full join
2014-11-05 15:04:21 -06:00
Gary Fredericks
edd268ae7d
Maintain the arglist metadata for helpers
...
This should hopefully make documentation via clojure.repl/doc and
others a bit more readable.
2014-05-01 17:26:33 +00:00
Justin Kramer
c8fbc16ec3
option for format to return names of params (with more dynamic vars - boo)
2013-12-13 12:32:08 -05:00
Justin Kramer
5aa351ab48
Merge pull request #9 from doffltmiw/master
...
add support for insert, update and delete queries
2013-12-13 08:23:00 -08:00
alice
e7fefe86a6
add columns, merge-columns and query-values clauses
2013-12-12 11:35:38 +09:00
Chris Perkins
a4e9f0ff46
Oracle support.
...
Omit AS in JOIN, FROM, etc. because Oracle does not support it.
2013-09-06 16:29:41 -06:00
alice
806b9bafd6
fix values clause to take multiple sets of values
2013-09-07 01:19:13 +09:00
alice
6f2ef8f6c3
add support for insert, update and delete queries
2013-09-06 23:18:05 +09:00
Justin Kramer
03fe1650ee
improve identifier quoting
2013-08-07 21:56:31 -04:00
Justin Kramer
9d46b48366
special case identifier quoting for *
2013-08-07 18:22:44 -04:00
Justin Kramer
cff7abad1f
accept explicit parameters in quote-identifiers
2013-08-07 10:30:15 -04:00
Justin Kramer
7d4cc64ecb
:distinct-on helper fn; fixes #1
2013-08-06 16:29:26 -04:00
Justin Kramer
23659e94bc
mention that :ansi quoting is for postgres
2013-08-06 16:17:05 -04:00
Justin Kramer
74669d62b5
quote aliases better
2013-08-06 15:23:37 -04:00
Justin Kramer
b3da410e38
identifier quoting
2013-08-06 15:08:09 -04:00
Justin Kramer
4590b93df5
keyword syntax for bindable param
2013-08-06 14:27:56 -04:00
Justin Kramer
96ddbc18f4
keyword syntax for sql calls
2013-08-06 14:06:00 -04:00
David Powell
90f3088c24
Don't upper case function calls
...
To allow for case-sensitive function names
2013-04-12 19:11:33 +02:00
Justin Kramer
28ca0add97
count-distinct fn handler
2012-12-03 12:39:06 -05:00
Justin Kramer
76d6ccbcdb
:left-join & :right-join clauses; simplifies :join syntax
2012-10-19 12:41:26 -04:00
Justin Kramer
bea39e3527
reset *fn-context?* for subqueries
2012-10-18 22:00:07 -04:00
Justin Kramer
7771a386ea
prevent nil modifiers
2012-08-26 12:14:13 -04:00
Justin Kramer
33ba71ddaa
regex alias
2012-08-26 12:14:07 -04:00