Commit graph

944 commits

Author SHA1 Message Date
Mike Blume
f8809c883b add build badges to readme 2015-03-15 17:59:44 -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
Michael Blume
d6295a7fc6 Merge pull request #53 from MichaelBlume/format-format
format the format namespace a bit more nicely
2015-03-15 10:49:56 -07:00
Michael Blume
c243f5a157 Merge pull request #44 from MichaelBlume/travis
add travis config
2015-03-13 11:40:48 -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
941a5b708a add scm info to the project.clj 2015-03-12 14:36:16 -07:00
Mike Blume
bb77ba945f quote this url 2015-03-12 14:36:16 -07:00
Mike Blume
42c29506a0 Merge remote-tracking branch 'icambron/parameter-fns' into HEAD 2015-03-09 23:31:17 -07:00
Mike Blume
3fb93d829c Merge remote-tracking branch 'cloojure/patch-2' into HEAD 2015-03-09 21:56:48 -07:00
Dave Della Costa
a683d4674c Bump version number to 0.5.1 on README.md 2015-03-10 11:52:35 +09:00
Mike Blume
0be5eb3638 begin 0.5.2 development cycle 2015-03-09 13:26:26 -07:00
Mike Blume
210b2c43ff 0.5.1 2015-03-09 13:23:34 -07:00
Mike Blume
1bec3a6143 add :url to project.clj 2015-03-09 12:08:29 -07:00
Mike Blume
e3b42d5cd9 begin 0.5.1 development cycle 2015-03-09 12:08:07 -07:00
Mike Blume
f8be9cccad 0.5.0 2015-03-09 09:59:01 -07:00
Mike Blume
34f84e41b4 Merge remote-tracking branch 'dave/master' into HEAD 2015-03-09 09:56:11 -07:00
Dave Della Costa
ae7a4fbb3d Bump version to 0.5.0-SNAPSHOT, ref. #51 2015-03-09 13:42:08 +09:00
Dave Della Costa
11e6d1c017 Merge in Pull Request #34, Support basic common table expressions. 2015-03-09 13:22:02 +09:00
Dave Della Costa
6d0ff344b9 Adds basic tests for PR #34, common table expressions 2015-03-09 13:21:41 +09:00
Michael Blume
c6b621583e Merge pull request #43 from MichaelBlume/clause-order
make clause-order extensible
2015-03-06 23:02:12 -08: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
8e7615ee4d Merge pull request #47 from MichaelBlume/testing
Testing
2015-03-03 20:23:47 -08:00
Michael Blume
b621273fd2 Merge pull request #49 from MichaelBlume/expected-first
in unit test, put expected value first
2015-03-03 20:23:31 -08: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
Mike Blume
a931e375f7 in unit test, put expected value first
is assumes that the first argument to = is a fixture, and the second is
the result of a computation, when it prints Expected: and Actual:
2015-03-03 19:55:08 -08:00
Michael Blume
f63de95e14 Merge pull request #46 from MichaelBlume/upgrade-clojure
upgrade clojure dependency
2015-03-03 16:18:57 -08:00
Mike Blume
c8f647ea26 simple format tests 2015-03-03 16:16:41 -08:00
Mike Blume
cbb71c3db9 test apply too 2015-03-03 16:16:41 -08:00
Mike Blume
78ac2e65fd upgrade clojure dependency 2015-03-03 16:15:37 -08:00
Alan Thompson
34bbe0b4ab Update README.md
Put in automatic lein coordinates from clojars
2015-03-03 14:39:54 -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
Michael Blume
c63fa73d41 Merge pull request #41 from MichaelBlume/avoid-collision
avoid name collision with clojure.core/update
2015-03-03 13:29:40 -08:00
Mike Blume
e494315fa0 add travis config 2015-03-03 12:01:11 -08:00
Mike Blume
2cafa5940e avoid collision with update in tests as well 2015-03-02 15:08:16 -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
Howard M. Lewis Ship
0c3f3d0403 Fix example of insert-into w/ nested query
The previous example generated SQL that could not actually execute.
2014-10-22 10:01:46 -07:00
Howard M. Lewis Ship
1157887edd Merge pull request #21 from gfredericks/arglist-metadata
The defhelper macro should expose the arglist as the standard :arglist metadata
2014-10-07 18:12:50 -07:00
Howard M. Lewis Ship
0aeb9990da Update README.md 2014-10-07 15:08:57 -07:00
Howard M. Lewis Ship
f9ec9001e0 Extend the examples for insert-into 2014-10-07 15:07:39 -07:00
Howard M. Lewis Ship
68d8091f8a Add a file to track changes 2014-10-07 14:46:52 -07:00