Commit graph

116 commits

Author SHA1 Message Date
Sean Corfield
d065a04e18 placeholder (should :array unwrap params?) 2022-05-20 10:34:10 -07:00
Sean Corfield
5fe73c75bc Support custom dialects fixes #401 (add docs/tests) 2022-05-01 17:34:31 -07:00
Sean Corfield
124fac6f28 :insert-into should support abitrary functions for table fixes #402 2022-04-23 15:12:55 -07:00
Sean Corfield
a2e02c8a03 fix #394 by escaping quote chars
This matches the HoneySQL 1.x behavior now.
2022-03-31 17:34:51 -07:00
Sean Corfield
f711b934fa fix #387 properly 2022-02-22 21:27:10 -08:00
Sean Corfield
803ff41dc0 Dehyphen improvements fixes #387 2022-02-21 19:09:49 -08:00
Sean Corfield
4bf76920ef fix #385 by quoting inlined uuids 2022-02-09 10:20:36 -08:00
Sean Corfield
c7c634d694 change :' to use format-entity #352 2022-02-02 23:51:01 -08:00
Sean Corfield
1f2773bd16 address #352 by treating :'foo literally 2022-02-02 22:04:44 -08:00
Sean Corfield
139de6f56c fix #380 by accounting for vars 2022-01-21 13:05:15 -08:00
Sean Corfield
826407e9db first pass of caching formatter
needs more documentation.

Initial results suggest a speedup for simple queries of 2-3x.
Complex queries can see up to 20x speedup.
2022-01-08 00:41:21 -08:00
Sean Corfield
2670abc75f fix #377 by adopting @corasaurus-hex function as map= 2022-01-07 23:16:56 -08:00
Sean Corfield
8979e938f3 fixes #374 2021-12-23 13:32:47 -08:00
Sean Corfield
6aee04e25c fixes #365 2021-10-03 22:18:12 -07:00
Sean Corfield
dae09ff601 fixes #363 by improving inlining capability 2021-09-25 17:06:48 -07:00
Sean Corfield
9ece8972b5 fixes #344 by special-casing MySQL SET 2021-08-12 18:26:39 -07:00
Sean Corfield
50bbfef07f Fixes #338 properly by making offset/fetch smarter 2021-07-17 17:57:17 -07:00
Sean Corfield
7e84b58463 fixes #338 by adding ONLY to :fetch 2021-07-17 13:32:43 -07:00
Sean Corfield
a393cd89e2 fixes #337 by using clojure.test for cljs 2021-07-15 19:26:59 -07:00
Sean Corfield
fe4be6cca6 Make test cljs-compatible 2021-05-10 22:46:36 -07:00
Sean Corfield
9e0b31bbd9 Fixes #325 Fixes #326 adds tests/docs 2021-05-10 22:44:57 -07:00
Neil McCalum
9c38554154 format with opts, hyphen to under in function names, improve and relocate tests 2021-05-11 01:07:34 +12:00
Sean Corfield
20cba15da2 Fixes #321 by adding :checking option
Initial linting is only for IN () and IN (NULL)
2021-04-22 22:13:32 -07:00
Sean Corfield
f606dc6044 Fixes #323 by allowing multiple column names 2021-04-22 19:16:30 -07:00
Sean Corfield
862a2496c6 Consistent use of 1.x / 2.x 2021-04-11 11:09:47 -07:00
Sean Corfield
88282ee258 Fixes #316 by adding check on entity characters
Also record that documentation addresses #300, #309, #313, and #314.
2021-04-09 23:41:59 -07:00
Sean Corfield
2fe083f8e6 Support named arguments in format again
With the advent of Clojure 1.11 and the ability to call functions that
accept named arguments using a hash map, I have restored the named
argument version of `format` (in addition to the hash map version),
and if you are using Clojure 1.11 you can mix'n'match styles.
2021-04-09 17:04:48 -07:00
Sean Corfield
af382708e5 Fixes #319 by making register-clause! idempotent
Technically, it removes any instance of the clause from the ordering
before it attempts to add it back in, allowing you to correct the
order if you got it wrong.
2021-04-09 15:58:56 -07:00
Sean Corfield
06f25ed2e3 Fixes #317 by dropping qualifier in :set clause 2021-04-01 12:50:09 -07:00
Sean Corfield
d35d9141bc Fixes #280 by adding [:escape pattern chars] 2021-03-12 15:39:54 -08:00
Sean Corfield
78ca2a0530 Fixes #305 by supporting more complex JOIN source 2021-02-27 09:33:20 -08:00
Sean Corfield
770beec886 Add test for (v1) SQL Injection in insert #299 2021-02-22 10:56:32 -08:00
Sean Corfield
28a4074e12 Add flexibility for on conflict / on constraint 2021-02-15 20:43:53 -08:00
Sean Corfield
0a83601c3c Fixes #298 by restoring multi-CTE capability
Reverts code changes that stripped the sequence support.
Updates the docs to clarify how sequence support works.
2021-02-10 12:04:53 -08:00
Sean Corfield
e02b5b5c82 Revert "Document with / CTE"
This reverts commit c00fbffe30.
2021-02-10 11:50:00 -08:00
Sean Corfield
c00fbffe30 Document with / CTE
Change the implementation to support just a pair instead of the legacy,
weird sequence of one pair.
2021-02-06 09:00:46 -08:00
Sean Corfield
53bcfd8bea Move toward 2.0.0 Alpha 1 2021-02-01 14:49:17 -08:00
Sean Corfield
379d3d05c4 Drop ? from all keyword options 2021-02-01 13:10:57 -08:00
Sean Corfield
7aab640e30 Fixes #291 by ensuring consistent values
For uneven vectors of values, pad with NULLs.

For uneven maps of values, use full set of keys across all of them.
2021-02-01 10:44:07 -08:00
Sean Corfield
8373c72f45 Fixes #286 by supporting WAIT, SKIP LOCKED
NOWAIT was already supported.
2021-01-30 11:43:48 -08:00
Sean Corfield
d2968bbfcc Fixes #289 by implementing USING 2021-01-30 11:19:12 -08:00
Sean Corfield
17c5e4b980 Add test for question in #285 2020-12-04 10:28:09 -08:00
Sean Corfield
273732089b Improve :inline/:raw
Note: these are still in flux!
2020-10-14 11:50:32 -07:00
Sean Corfield
9da9dfe399 Fix test for issue 263 2020-10-12 22:55:16 -07:00
Sean Corfield
97a3782112 Support :inline option
This is similar to `:parameterizer :none` (but better).
2020-10-09 21:52:18 -07:00
Sean Corfield
0c7ce43381 Address #279 by treating UNION expressions as nested 2020-10-09 21:30:45 -07:00
Sean Corfield
8b2f0ef292 Add locking select support via for/lock 2020-09-28 20:45:43 -07:00
Sean Corfield
1fdd50d6b0 Add more tests on insert 2020-09-28 13:18:34 -07:00
Sean Corfield
6db2426046 Fix do update set; add on conflict tests 2020-09-28 11:49:29 -07:00
Sean Corfield
25097af134 First cut of on conflict support 2020-09-26 15:16:12 -07:00
Sean Corfield
002523bb8c Generate AS for select/from; except for Oracle 2020-09-26 00:17:31 -07:00
Sean Corfield
0052aade7c Implement variadic and/or/+/* 2020-09-25 16:40:15 -07:00
Sean Corfield
5449c23ede Clarify tests
Annotate parameterizer tests as known failures.

Create inline versions of :parameterizer :none tests.
2020-09-25 16:39:50 -07:00
Sean Corfield
a6c1f98b71 Fix CTE syntax
Should always be wrapped in parens
2020-09-25 16:38:38 -07:00
Sean Corfield
1ebbbc1772 Fix inline string behavior 2020-09-25 16:38:11 -07:00
Sean Corfield
9f20ade0fe Fix is/not null generation 2020-09-25 15:31:11 -07:00
Sean Corfield
11ef895c4a Clean up dialect support; start docs
Also move old namespaces to test-only tree for reference while I 
continue developing V2.
2020-09-24 19:07:32 -07:00
Sean Corfield
3ce47b92f2 Implement :inline syntax; allow select call without alias 2020-09-23 22:52:57 -07:00
Sean Corfield
97531fa4cf Implement array as SQL syntax instead of special HoneySQL syntax 2020-09-23 22:25:13 -07:00
Sean Corfield
f7d5e3a4cf Down to just 8 failures now!
Mising: array, inline, parameterizer.
2020-09-23 18:15:20 -07:00
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