Commit graph

335 commits

Author SHA1 Message Date
Sean Corfield
1a699f18ab Support more clauses; flesh out dialect and clause ordering 2020-09-23 12:55:02 -07:00
Sean Corfield
a1d90a6382 Work toward more 1.x compatibility
Temporarily disable `AS` in alias while testing compatibility; only 
quoted by default if `:dialect` specified (may revisit this).
2020-09-23 00:14:25 -07:00
Sean Corfield
834ac3a096 Rename sql-format back to format now Chlorine is updated! 2020-09-21 10:56:05 -07:00
Sean Corfield
1dc0447244 Convert more RCFs to tests 2020-09-20 22:25:28 -07:00
Sean Corfield
b6d6d2c4f4 Refactor to sql-format for now 2020-09-20 21:33:04 -07:00
Sean Corfield
2c98d35f63 Start some tests; implement more clauses 2020-09-20 19:17:37 -07:00
Sean Corfield
29b6e47a8e Experimental WIP 2020-09-20 18:48:07 -07:00
Sean Corfield
b3baa094c2 Fixes #257 by adding CROSS JOIN 2020-05-29 16:01:49 -07:00
Sean Corfield
d86150784b Fixes #239 by never qualifying inserted column names 2020-05-18 12:06:20 -07:00
Sean Corfield
ac92047d5e Refer/link to next.jdbc as appropriate 2020-03-08 15:40:08 -07:00
Sean Corfield
58a9a97694 Remove macrovich dependency 2020-03-08 15:30:48 -07:00
Sean Corfield
8784a104fb Fixes #253 properly; logs #254 and #255 in CHANGES 2020-03-06 09:42:51 -08:00
Ted Coakley
e7dce6b347 Adds support for except set operation #254 2020-03-06 17:34:06 +00:00
Sean Corfield
9fb3d42660 Release 0.9.9 fixes #253 2020-03-02 16:01:14 -08:00
Sean Corfield
a732815b37 Fixes #249 by adding :namespace-as-table? option for 0.9.8 2019-09-07 23:42:38 -07:00
Sean Corfield
e7f2343ae7 Tweak argument names 2019-09-07 15:58:48 -07:00
Sean Corfield
bb73dcbda7 Fixes #162 by adding composite/:composite
Relies on paren-wrapping within subqueries which is the context for 
values.
2019-09-07 15:56:06 -07:00
Sean Corfield
f17a6f5582 Fixes #247 by reverting #132 / #131
Adds `*allow-namespaced-names?*` Var and `:allow-namespaced-names?` 
option so the previous behavior can still be used.
2019-09-07 15:18:10 -07:00
Sean Corfield
c573f3bd9c Fixes #235 by adding two different SET priority variants
This allows the behavior change in #200 to be worked around.
2019-09-07 14:55:06 -07:00
Sean Corfield
4ca74f2b0d Fixes #139 by checking columns arguments 2019-09-07 14:02:04 -07:00
Sean Corfield
7831ebed38 Fixes #128 by adding :truncate / truncate 2019-09-07 13:24:46 -07:00
Sean Corfield
94601ee5ae Fixes #248 by changing how aliases are rendered
In theory, the only change here will be to stop the paren-wrapping in 
generation of alias SQL -- but I think that treating alias/columns pairs 
like this (as a nested alias) is very suspicious anyway so that probably 
ought to be fixed "properly" at some point.
2019-09-05 16:38:20 -07:00
Sean Corfield
8bf68d1d10 Another run at fixing #246 2019-08-21 21:59:39 -07:00
Sean Corfield
a31426da6b Fixes #246
Also fixes reflection warning introduced in #237.
2019-08-21 16:03:21 -07:00
Sean Corfield
509df19702 Fix #242 by turning modifiers into a multimethod 2019-04-06 20:30:16 -07:00
Sean Corfield
05cc39a41c Revert #240 but keep the dependency updates 2019-04-02 11:25:15 -07:00
Sean Corfield
d10166c0ed Fix #240 by extending keyword call syntax
Also updates dev/test dependencies.
2019-03-27 10:51:26 -07:00
Cam Saul
bd076b193a
Fix query generation when user.language is Turkish 2019-02-08 20:02:31 -08:00
Griffin Smith
8c2142cb34 bind *parameterizer* in format-predicate
format-predicate throws an NPE if *parameterizer* is not bound - this
mirrors the binding form of `format` to allow supplying that as an
option.
2019-01-07 17:19:52 -05:00
Gordon Stratton
5faae8790f The "AS" alias is no longer split before quoting
Fixes #216
2018-10-01 15:19:03 +00:00
Sean Corfield
ea3e9b40bd Fix #228 by allowing no predicates in where/merge-where 2018-09-24 18:44:01 -07:00
Sean Corfield
284d0142b6 Fix #226 by adding assert 2018-09-02 18:35:02 -07:00
Vincent
6e3631822d Added Inlinable protocol for more sensible stringification of inline values, and to allow library users to further extend the inline behavior (#224) 2018-08-30 18:55:53 +02:00
Sean Corfield
2b238c5a47 Fix #221 by treating #inline nil as a special case 2018-08-03 17:13:46 -07:00
Sean Corfield
61d8926a63 First cut for #219 2018-06-29 21:59:17 -07:00
Sean Corfield
ea76608c7c Merge branch 'delete' of https://github.com/MichaelBlume/honeysql into MichaelBlume-delete
Corrects `delete` to support multiple tables.
Adds tests.
Adds README examples.

# Conflicts:
#	src/honeysql/format.cljc
#	src/honeysql/helpers.clj
2018-06-26 18:24:01 -07:00
Chris Targett
f778419cb9 Refactored parameterizer to use mutimethods
It was briefly mentioned in #honeysql on clojurians.slack.com that this
mechanism of extension uses a register method and an atom to support
extension when multimethods are used elsewhere.
2018-05-15 21:22:32 +01:00
Michael Blume
fcdf326968 Put SET after JOIN
Fix #200
2018-04-15 23:51:35 -07:00
Michael Blume
43e94bf497
Merge pull request #201 from vincent-dm/master
adds support for JOIN ... USING (...) syntax (#188)
2018-04-12 23:39:59 -07:00
Juvenn Woo
e874a6114d
Replace alter-var-root with atom for parameterizers 2018-03-09 14:11:50 +08:00
Juvenn Woo
2abe128008
Support register customized parameterizer 2018-03-09 11:54:14 +08:00
Nuttanart Pornprasitsakul
3206b099df Remove nil predicate from :and 2018-02-18 13:27:07 +07:00
Nuttanart Pornprasitsakul
15af00e0de Remove nil argument to where 2018-02-15 22:44:13 +07:00
Michael Blume
3588768970
Merge pull request #195 from madvas/master
Fix #193
2018-02-10 23:50:22 -08:00
Michael Blume
8ad38d28af
Merge pull request #196 from emidln/emidln/insert-into-drop-parens
Avoid wrapping QUERY with parens while formatting INSERT INTO ... QUERY
2018-02-10 23:48:01 -08:00
Vincent
8a6ecd94aa adds support for JOIN ... USING (...) syntax (#188) 2018-01-16 03:13:14 +01:00
Tianxiang Xiong
ccff2d2c23 Limit value context to sequences in value positions
Fix #198
2018-01-09 23:42:53 -08:00
Brandon Adams
c7df208e3e Avoid wrapping QUERY with parens while formatting INSERT INTO ... QUERY
This also adds a test using honeysql.format/format for an existing
format-clause test case for :insert-into which encodes the previously
failing behavior.
2017-12-12 16:09:31 -06:00
madvas
54b620d0f9 Fix #193 2017-11-29 19:41:35 +01:00
Michael Blume
faba02f2b4
Merge pull request #186 from arichiardi/parameterizer-none
Add :parameterizer :none option
2017-11-15 21:23:11 -08:00
Ken Fehling
7f64e26984
Add :intersect to default-clause-priorities 2017-11-15 18:59:54 -05:00
Andrea Richiardi
6cf89436d4 Add :parameterizer :none option
Sometimes you want to completely skip using parameters.

Postgres, in particular, complains with cryptic "syntax error at or near "$1"
whenever query parameters cannot be used for the query. An example would be
CREATE TABLE queries where the only parameters are the VARCHAR size.

This patch adds a :none option to :parameterizer which completely skips
parameter filling (and numbering), returning the SQL string only.
2017-11-06 17:13:02 -08:00
Andrea Richiardi
65037939b2 [Fix #167] Add ClojureScript self-host support
This patch uses the wonderful cgrand/macrovich for supporting both JVM and
self-host ClojureScript. The library avoids destructive code changes, no
namespaces were moved.

The patch also adds a runner for self-host tests by adding the lein-tach
plugin. Tests can be launched with:

  lein tach lumo (or planck)

See the lein-tach README for details.
2017-11-01 10:13:47 -07:00
Michael Blume
7256f7afba Revert "Merge pull request #169"
Revert the reversion, keep the behavior from 0.9.0, vectors will be
primarily used for function calls.
2017-08-25 09:12:53 -07:00
Michael Blume
a707222d53 Run all code samples from README as tests
using `lein test-readme` alias
2017-07-19 10:28:51 -07:00
Michael Blume
3eaf5edbc0 Merge pull request #169 from MichaelBlume/fix-tuples
Revert #149 and restore tuple behavior
2017-07-18 13:47:56 -07:00
Michael Blume
d99efb8606 allow inlining values
Most of the time we want to parameterize numbers, but sometimes we don't

Fixes #171
2017-07-18 12:50:27 -07:00
Michael Blume
62c4760c6a Revert "Merge pull request #149"
Should #168
2017-07-17 20:49:35 -07:00
Brandon Adams
f94e343f31 Reprioritize WITH wrt UNION and UNION ALL
WITH needs to come before clauses that are part of a UNION
or UNION ALL.[1][2][3][4]

[1] "A CTE must be followed by a single SELECT, INSERT, UPDATE, or DELETE
statement that references some or all the CTE columns."
https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql

[2] "the WITH clause itself is attached to a primary statement that can
also be a SELECT, INSERT, UPDATE, or DELETE"
https://www.postgresql.org/docs/9.6/static/queries-with.html

[3] https://mariadb.com/kb/en/mariadb/with/

[4] "All common table expressions (ordinary and recursive) are created
by prepending a WITH clause in front of a SELECT, INSERT, DELETE, or
UPDATE statement."
https://sqlite.org/lang_with.html

Added a test case demonstrating the expected behavior for each of
UNION and UNION ALL.
2017-06-27 20:01:52 -07:00
Eli Naeher
00316fc6bd Add helpers for :with and :with-recursive clauses 2017-05-19 22:59:21 -07:00
Michael Blume
f22cae3278 Require that defhelper arglist has two elements
one for the map and one for varargs

Add & to metadata arglists, make them correct
2017-05-10 09:46:54 -07:00
Michael Blume
e0072efbdc Merge pull request #132, allow namespaced keywords 2017-04-05 21:11:45 -07:00
Tom Connors
bdfee0883e Fix using maps with different key orders in :values 2017-03-24 00:18:04 -07:00
Joost Diepenmaat
f8b913d667 Fix operators in value positions 2017-02-17 10:21:23 +01:00
Richard Newman
9dd87d14a0 Don't parenthesize the subclauses of a UNION, UNION ALL, or INTERSECT clause. Fixes #141. 2016-10-12 08:50:54 -07:00
Sean Corfield
6a0eacdd5f Address #138 : add priority for union/union-all
By prioritizing union / union-all to happen early on, complex queries
with order by / limit / offset etc will be correctly formatted _after_
the union / union-all clause has been formatted.
2016-09-13 19:50:50 -07:00
Richard Newman
f9546af9ca Make defhelper work. 2016-07-18 14:13:10 -07:00
Richard Newman
ec03b7c06f ClojureScript doesn't have IRecord, but we should be using record? anyway. 2016-07-18 14:12:01 -07:00
Mike Blume
7c8cdf241d MichaelBlume's first pass at ClojureScript support. 2016-07-18 14:12:01 -07:00
Mike Blume
5603e9df9f Add ClojureScript build, move files to cljc.
ClojureScript build fails.
2016-07-18 14:10:52 -07:00
Jon Doane
5b197f9756 Solve an issue where namespaced keywords and symbols where only taking the name portion of the identifier.
- This now checks if there is a namespace and prepends it to the name if it exists.
2016-07-09 10:37:33 -04:00
Michael Blume
3265e4e14d fix arglist metadata 2016-05-21 13:26:18 -07:00
Alexander K. Hudek
3ec65bd198 Treat numbers as paramterized values to fix issues with NaN, Infinity, and -Infinity. 2016-05-17 14:37:39 -04:00
Michael Blume
43df955a86 Merge pull request #111 from stuarth/master
allow joins without a pred
2016-03-30 23:10:18 -07:00
Michael Blume
d9567e64e0 Merge pull request #110 from csummers/master
escape quote characters in quoted identifiers
2016-03-12 17:33:09 -08:00
Dave Della Costa
0662a00722 Merge pull request #103 from jakemcc/add-intersect
add intersect support
2016-03-02 12:37:17 -05:00
Stuart Hinson
80e9d2ec44 allow joins without a pred 2016-03-01 09:39:21 -05:00
Curtis Summers
47cefd0371 escape quote characters in quoted identifiers 2016-02-24 06:45:49 -06:00
Michael Blume
06c97376ef prevent records from being treated as maps
Thanks to @djwhitt and @blinsay for reporting and for providing
test cases.

Fixes #106
2016-02-09 14:09:22 -08:00
Jake McCrary
8fa44d22b3 add INTERSECT support 2015-11-29 17:49:45 -06:00
Michael Blume
607ee17cca Merge pull request #95 from emidln/emidln/with_column_names
Support column names in :with clauses
2015-10-18 11:07:03 -07:00
Brandon Adams
10a1565467 Support column names in :with clauses
This binds `honeysql.format/*subquery?*` to `false` which turns
on processing of a cte-name like `[:foo {:columns [:a :b :c]}]`
resulting in a string like `WITH foo (a, b, c)`.
2015-10-12 15:13:16 -05:00
Jon Doane
4b1f26632e Add a "huh" on the allow-dashed-names option on honeysql.format/format. 2015-10-11 12:14:47 -04:00
Jon Doane
1f6e9151fd Updated default for allowing dashes. 2015-10-11 11:03:03 -04:00
Jon Doane
95e208485a Added support for preserving dashes in quoted names.o 2015-10-11 10:47:14 -04:00
loganlinn
b51611d4d6 Add fn-handler for CASE statement 2015-08-06 11:29:54 -07:00
Mike Blume
81f2c72675 one more field accessor 2015-06-15 15:54:27 -07:00
Mike Blume
fae5545e8a move format-predicate down 2015-06-15 15:54:27 -07:00
Mike Blume
38e3812e66 just call it to-sql 2015-06-15 15:54:26 -07:00
Mike Blume
cb296e2e31 avoid boilerplate using defrecord 2015-06-15 15:44:35 -07:00
Mike Blume
04a7086687 be clear that these are field accessors
not function calls
2015-06-15 15:44:34 -07:00
Donald Ball
713f72cfb6 Fix the parameterizable protocol to include nil
I forgot that Object doesn't include nil on protocols.

I added test coverage demonstrating the regression, only to note that
parameterized and literal queries produce different sql for the nil
case. I believe only the former is actually valid ANSI SQL, though mysql
at least does not care.
2015-05-20 11:23:36 -04:00
Mike Blume
115ac81fee Merge pull request #74 2015-05-08 16:41:11 -07:00
Mike Blume
6b64743315 add pname to *param-names* once per value
keep *params* and *param-names* at the same count
2015-05-08 14:23:28 -07:00
Andy Chambers
203296149f Add support for exists 2015-04-24 08:08:13 -07:00
Donald Ball
4bdaae39af Convert seq param values to literal sql param lists
This allows seqs to be used as param values, e.g. for IN clauses. It
also converts sets to seqs for the same purpose.

It does not expand the parameter name when this occurs, which will lead
to a mismatch between the *param-names* and *params* collections. It is
not clear how *param-names* are intended to be used, so I have no better
fix to suggest other than repeating a seq's param name the corresponding
number of times into that collection.
2015-04-21 14:28:28 -04:00
Donald Ball
2820662f59 Apply seq to sets when converting to sql
This allows them to be used as values, e.g. for in clauses, as
demonstrated in the test.
2015-04-20 23:40:59 -04:00
Mike Blume
72784452b9 Merge remote-tracking branch 'dball/support-locking-selects' into HEAD 2015-04-17 14:25:23 -07:00
Michael Blume
198115fb84 Merge pull request #69 from mishok13/nulls-first-last-in-order-by
NULL order specification support
2015-04-17 14:20:23 -07:00
Donald Ball
bc0b7e904f Support locking selects
This will need documentation before being merged.
2015-04-17 15:15:23 -04:00
Andrii V. Mishkovskyi
500b55775e Handle :nulls-first and :nulls-last in order-by
This commit implements NULLS (FIRST | LAST) in ORDER BY clause, as
introduced by SQL:2003, link to grammar specification:
http://savage.net.au/SQL/sql-2003-2.bnf.html#sort%20specification%20list

Only PostgreSQL 8.4+ and Oracle 10+ support said feature as of
currently.
2015-04-17 12:33:30 +02:00
Andrii V. Mishkovskyi
11d4ff37ec Adding a comment for future reference 2015-04-16 21:23:19 +02:00
Logan Buckley
f5c111a1be Simplify -to-sql. 2015-04-15 10:39:33 -05:00
Logan Buckley
33ae0c4239 Remove unused require. 2015-04-15 10:37:46 -05:00
Logan Buckley
84387afaa5 Add SqlArray type and reader literal support. 2015-04-15 10:29:34 -05:00
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
Niels van Klaveren
0803225582 Added DELETE clause that takes a FROM clause
Makes T-SQL join deletes possible
2015-04-01 12:28:00 -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
Justin Kramer
51d0d220a0 param type, input-parameters arg for format, more docs 2012-08-24 22:40:50 -04:00
Justin Kramer
cb99df7c36 qualify, docs 2012-08-24 21:53:54 -04:00
Justin Kramer
e45a58f267 allow custom clauses 2012-08-24 18:19:17 -04:00
Justin Kramer
faa495c362 don't allow nil in :offset or :limit 2012-08-24 17:35:49 -04:00
Justin Kramer
cfadae53d1 always pipe base map through build, to ensure consistency 2012-08-24 17:08:22 -04:00
Justin Kramer
18d5fa19e8 make clause-building extensible, move helper fns to honeysql.helpers 2012-08-24 16:50:56 -04:00
Justin Kramer
3b97fd4f06 allow string aliases 2012-08-22 11:23:00 -04:00
Justin Kramer
73da451ab3 not-like sugar 2012-08-18 15:41:51 -04:00
Justin Kramer
df77e861a3 "match" fn-handler 2012-08-17 10:35:34 -04:00
Justin Kramer
70235d5140 delegate to-sql responsibility to fn-handler; expand [:< 1 2 3] etc 2012-08-16 16:24:49 -04:00
Justin Kramer
c9e3503263 multimethod for extensible sql fn handlers 2012-08-16 15:55:50 -04:00
Justin Kramer
6438c04486 better null handling; normalize "not equal" variations as "<>" 2012-08-16 15:41:58 -04:00
Justin Kramer
e7265b60bb turn dashes into underscores when formatting 2012-08-16 14:50:08 -04:00
Justin Kramer
212ebd31b4 ignore unrecognized clauses 2012-08-07 17:58:51 -04:00
Justin Kramer
a9fcd837ca un-select 2012-08-07 17:58:32 -04:00
Justin Kramer
2145cded0e format-predicate 2012-07-13 18:45:25 -04:00
Justin Kramer
cef05d4ef5 fix params 2012-07-13 17:20:48 -04:00
Justin Kramer
f9b262cefb move types to separate ns 2012-07-13 12:43:18 -04:00
Justin Kramer
039ab16447 make SqlCall and SqlRaw readable and accept metadata 2012-07-13 12:35:58 -04:00
Justin Kramer
d167bfbc12 modifiers api 2012-07-13 11:46:37 -04:00
Justin Kramer
265fa6c81f fix joins 2012-07-13 11:46:30 -04:00
Justin Kramer
b9f1e17c91 revise api 2012-07-13 10:53:19 -04:00
Justin Kramer
07559aae74 include sql-fn and sql-raw in core api 2012-07-13 09:57:36 -04:00
Justin Kramer
06443cd1dd api 2012-07-13 08:50:20 -04:00
Justin Kramer
40d25c8726 don't paren-wrap top-level query 2012-07-12 23:14:48 -04:00
Justin Kramer
92aa49deeb better spacing for modifiers 2012-07-12 22:56:52 -04:00
Justin Kramer
5c2e25abd7 fix joins; modifiers 2012-07-12 22:39:01 -04:00
Justin Kramer
b61435e1e4 not in 2012-07-12 22:06:05 -04:00
Justin Kramer
22866a6edc initial commit - basic working data structure -> sql 2012-07-12 21:50:13 -04:00