Sean Corfield
c62f5da3f8
make numbered params work with 'in'
2022-12-16 23:56:53 -08:00
Sean Corfield
4ea630ed90
basic testing for numbered params
2022-12-16 23:20:17 -08:00
Sean Corfield
359d9de668
basic numbered parameter support
2022-12-16 23:11:45 -08:00
Youngil Choi
a87fa0c9ab
Improve type formatting logic in :cast function
2022-11-20 06:51:43 +09:00
Sean Corfield
562b20634a
fix #434 by special-casing array
2022-11-17 22:39:48 -08:00
Sean Corfield
15cf3ae588
improve :values error message
2022-11-17 08:31:27 -08:00
Sean Corfield
db1b37eaa3
fix #441
2022-11-07 09:18:36 -08:00
Sean Corfield
95e50a930e
fixes #386 #437 #439
2022-11-05 17:15:32 -07:00
Sean Corfield
e8ea9283cc
fix Support full TRUNCATE syntax (cascade, identity) #438
2022-11-04 23:40:30 -07:00
Ike Mawira
73d36ab2b5
Update docs and tests for WITH clause
2022-09-23 16:54:30 +03:00
Ike Mawira
30e554f31c
Allow with expr AS ident syntax in WITH clause
2022-09-22 19:40:15 +03:00
Sean Corfield
061288f1c0
address #415 by supporting multi-column add/alter/modify
2022-09-12 18:17:26 -07:00
Sean Corfield
5d7a3faea5
address #415 by supporting multiple drop columns
2022-09-12 13:51:54 -07:00
Sean Corfield
02d20bd78c
address #430 by expanding escape hatch from #352
2022-09-11 20:52:53 -07:00
Sean Corfield
723b134e90
fix set-dialect! reset and document it
2022-09-11 15:09:12 -07:00
Sean Corfield
63df2f3dc9
address #427 by adding set-options!
2022-09-11 14:21:39 -07:00
Sean Corfield
2f1d3ae870
fixes #421 replace into
2022-09-03 21:34:09 -07:00
Sean Corfield
9569b19a34
address #425 for map inserts
2022-09-02 22:35:17 -07:00
Sean Corfield
3073d28525
address #423 by adding support for default
...
needs documentation
2022-09-01 22:54:00 -07:00
Sean Corfield
a879a2d8a1
auto-quote unusual entities by default
2022-08-23 15:41:38 -07:00
Rob Hanlon
204f6fa72a
Support materialization control in WITH
...
Adds an optional third value to `with` vectors, which can be the
following:
* `:materialized` -> SQL is `WITH cte AS MATERIALIZED (...)`
* `:not-materialized` -> SQL is `WITH cte AS NOT MATERIALIZED (...)`
* omitted or anything else -> SQL is `WITH cte AS (...)`
Note that materialization control is not available on WITH RECURSIVE
CTEs, so `format-with` was modified to take a third argument that
returns the `AS ...` separator, which is constantly `"AS"` for WITH
RECURSIVE, and obeys the aforementioned rules for non-recursive CTEs.
Resolves #392 .
2022-08-16 16:01:52 -07:00
Sean Corfield
d31600d2c0
fix string for cljs too
2022-08-06 22:29:17 -07:00
Sean Corfield
c10a97e1ec
use default instead of js/Object
...
This shuts the cljs compiler up
2022-08-06 22:20:29 -07:00
Sean Corfield
2cba8bc3d7
fix cljs for #419
2022-08-06 22:02:21 -07:00
Sean Corfield
99e955f420
fix #419 by adding InlineValue protocol
2022-08-06 21:49:49 -07:00
Sean Corfield
e6654f7a22
check for empty where clauses fix #413
2022-08-06 21:11:08 -07:00
Sean Corfield
f0ada59fff
fix #406
2022-07-29 15:41:04 -07:00
Sean Corfield
91e75a7edf
Merge branch 'develop' of github.com:seancorfield/honeysql into develop
2022-05-20 10:46:07 -07:00
Sean Corfield
d065a04e18
placeholder (should :array unwrap params?)
2022-05-20 10:34:10 -07:00
Sean Corfield
2e9b395b31
remove old calva workaround
2022-05-19 20:29:32 -07:00
Sean Corfield
5fe73c75bc
Support custom dialects fixes #401 (add docs/tests)
2022-05-01 17:34:31 -07:00
Sean Corfield
8c8b05e67f
Support custom dialects: addresses #401
...
Still needs tests and documentation.
2022-04-30 22:03:36 -07:00
Sean Corfield
5e847cde0e
only throw for named param #396
2022-04-23 16:03:21 -07:00
Sean Corfield
270b9439c8
attempting to cache SQL that contains IN () will throw fixes #396
2022-04-23 15:54:24 -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
7f8b7a79b1
addresses #403 : improve error message; improve docs
2022-04-23 13:40:34 -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
314f497417
fix #400 by adding :table clause
2022-03-26 16:58:28 -07:00
Sean Corfield
af69f12630
address #398 (needs docs)
2022-03-25 21:48:00 -07:00
Fredrik Vaeng Røtnes
ca0feb57e5
Fix docstring of add-clause-before
...
The result of adding a clause to a list in which the it already appears, is not to remove it from the list, but to move it to the end.
2022-03-19 22:16:20 +00: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
8a2f447676
Fix #382 by adding :case-expr syntax
2022-01-29 17:19:17 -08:00
Sean Corfield
139de6f56c
fix #380 by accounting for vars
2022-01-21 13:05:15 -08:00
Sean Corfield
e3de2a621d
document :cache option
...
Also try to clear up confusion about function syntax while I'm adding
examples!
2022-01-20 13:02:17 -08:00
Sean Corfield
18adeb1048
rename to satisfy Eastwood
2022-01-10 11:12:47 -08:00
Michiel Borkent
e331ba0a0e
Improve performance and GraalVM image size
2022-01-10 13:58:25 +01: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
99ce051a9d
add array/struct support
2022-01-07 12:53:30 -08:00
Sean Corfield
e8e6c7f932
address #281 - support select foo.* except
2022-01-07 11:35:08 -08:00
Sean Corfield
a653f9b157
address #281 add select * except / replace for BigQuery
2022-01-06 23:02:20 -08:00
Sean Corfield
8979e938f3
fixes #374
2021-12-23 13:32:47 -08:00
Sean Corfield
b30aa0f3f9
fix #375
2021-12-21 22:54:02 -08:00
Sean Corfield
e0cafbd434
extend lint checks to several column lists
2021-12-03 13:06:34 -08:00
Sean Corfield
66fc3a68ee
fix #354
2021-11-27 15:27:12 -08:00
Sean Corfield
d660c059d4
fix #370
2021-11-26 22:40:51 -08:00
Sean Corfield
be1df97b2b
fix #371
2021-11-26 22:30:36 -08:00
Sean Corfield
3cacec9c32
addresses #366 -- needs documentation!
2021-10-03 22:32:05 -07:00
Sean Corfield
6aee04e25c
fixes #365
2021-10-03 22:18:12 -07:00
Sean Corfield
3d0a9ba79c
fixes #367
2021-10-03 21:59:11 -07:00
Sean Corfield
92e0a04a84
fixes #353 fixes #349
2021-09-25 17:27:04 -07:00
Sean Corfield
dae09ff601
fixes #363 by improving inlining capability
2021-09-25 17:06:48 -07:00
Sean Corfield
c7c6102661
address #353 for create table/string entity
2021-09-09 10:41:37 -07:00
Sean Corfield
ec758dd818
support AS in DELETE FROM alias
2021-09-01 10:20:19 -07:00
Sean Corfield
9ece8972b5
fixes #344 by special-casing MySQL SET
2021-08-12 18:26:39 -07:00
Sean Corfield
10e6e755e9
fixes #340
2021-07-22 19:49:25 -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
cf136c2fdc
cljs/1.9 compatibility
2021-06-17 13:05:49 -07:00
Sean Corfield
00b20f6bbf
Address #330 by improving exception
2021-06-17 12:54:15 -07:00
Sean Corfield
228eb9fb67
Fix #327 by improving error message
2021-06-12 18:47:10 -07:00
Sean Corfield
a51cfe5a2e
Fixes #328 by adding :distinct special syntax
2021-06-12 18:15:59 -07:00
Sean Corfield
f508196ba3
Address #329
2021-06-12 18:15:41 -07:00
Sean Corfield
52308d484f
Support PostgreSQL && array operator
2021-05-17 10:40:19 -07:00
Sean Corfield
819c6e7c19
Additional work on #325 ; update CHANGELOG
2021-05-10 12:37:07 -07:00
Sean Corfield
e38bb73295
Merge pull request #325 from zugnush/quoting_fix
...
quoting for :%fun.col(s) syntax to match with [[:fun :col]]
2021-05-10 12:24:06 -07:00
Sean Corfield
572984a45d
Addresses #326 by allowing ON/USING to be optional
2021-05-10 12:05:07 -07:00
Sean Corfield
12bfa32962
Addresses #326 by no longer dropping parameters
2021-05-10 11:55:28 -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
Neil McCalum
6ebc017969
quoting for :%fun.col(s) syntax to match with [[:fun :col]]
2021-05-09 17:18:39 +12:00
Sean Corfield
d73560b7e3
Add :quoted-snake option
2021-05-08 21:01:28 -07: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
272b088918
Revert "Addresses #315 by expanding IN to handle nil"
...
This reverts commit 8a1e2cca71 .
2021-04-12 15:04:17 -07:00
Sean Corfield
e6a5bdb001
Fixes #308 by adding support for clauses
...
This also corrects the docstring for the join-by helper.
2021-04-11 04:18:14 -07:00
Sean Corfield
50fd829752
Addresses #310 by adding filter, order-by, within-group syntax
2021-04-11 14:32:48 -07:00
Sean Corfield
bbc0ac8500
Documentation updates
2021-04-11 11:39:06 -07:00
Sean Corfield
8a1e2cca71
Addresses #315 by expanding IN to handle nil
2021-04-10 10:57:13 -07:00
Sean Corfield
7a83bc13fe
Tweak docstring
2021-04-10 00:13:04 -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
106b19bcf6
Add clause-order to see current clause order
...
This should help when folks are figuing out `register-clause!` calls.
2021-04-09 16:31:16 -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
13d62b4ac1
Also show quoting/not-quoting and table.col forms
2021-03-15 16:54:13 -07:00
Sean Corfield
73c2062d6e
Investigation of string-as-entity behavior
...
This is something that should be updated in the docs.
2021-03-15 16:45:26 -07:00
Sean Corfield
9672ed3704
Fixes #312 (properly this time)
2021-03-15 15:26:22 -07:00
Sean Corfield
fd84864279
Fixes #161 by adding :raw clause support
2021-03-15 14:48:28 -07:00
Sean Corfield
16d04a1dfd
Fixes #297 by adding into/bulk-collect-into
2021-03-13 13:42:08 -08:00
Sean Corfield
cff1e5b43c
Fixes #284 by adding lateral expression syntax
2021-03-13 13:13:35 -08:00
Sean Corfield
82ee465820
Fixes #292 by supporting offset/fetch
2021-03-13 12:36:25 -08:00
Sean Corfield
6b070df52c
Finish off TOP implementation #292
2021-03-13 12:10:42 -08:00
Sean Corfield
479008c294
Address #292 by starting to support SELECT TOP
2021-03-12 18:54:19 -08:00
Sean Corfield
dc6a3662f0
Fixes #303 by adding ON DUPLICATE KEY UPDATE
2021-03-12 16:13:52 -08:00
Sean Corfield
d35d9141bc
Fixes #280 by adding [:escape pattern chars]
2021-03-12 15:39:54 -08:00
Sean Corfield
ddebda9481
Fixes #301 Fixes #306 by expanding drop/create syntax
2021-03-12 11:43:21 -08:00
Sean Corfield
445fb08e2f
Initial work to support #301
2021-03-11 20:07:59 -08:00
Sean Corfield
efcee05e0a
Beginnings of generic create #301 #306
2021-03-07 22:13:25 -08:00
Sean Corfield
e70985e93b
Fixes #277 by adding join-by
2021-03-07 19:21:13 -08:00
Sean Corfield
41522c89a1
Clarify 1.9+ Clojure support
2021-03-07 09:43:03 -08:00
Sean Corfield
78ca2a0530
Fixes #305 by supporting more complex JOIN source
2021-02-27 09:33:20 -08:00
Sean Corfield
331597b22b
Improve on conflict on constraint syntax
2021-02-15 17:56:47 -08:00
Sean Corfield
e23502eba8
Add create/drop extension #293
2021-02-13 22:06:43 -08:00
Sean Corfield
38da6f567b
Fixes #294 by applying inline everywhere
2021-02-13 21:29:22 -08:00
Sean Corfield
e585ded37e
Restore upsert helper for #293
2021-02-13 19:08:40 -08:00
Sean Corfield
6355452102
Update docs for the PG extension stuff
2021-02-13 16:17:30 -08:00
Sean Corfield
f6975ef6bd
Fix select as, select distinct on
2021-02-13 15:58:56 -08:00
Sean Corfield
4ce56997c9
Fix rename table
2021-02-13 12:24:21 -08:00
Sean Corfield
4b7ded4009
WIP nilenso test (fails)
2021-02-13 10:50:36 -08:00
Sean Corfield
41ed38ea38
Finish and document DDL
2021-02-12 21:50:22 -08:00
Sean Corfield
167d7cee0c
Addresses #293 by adding alter table stuff
...
And documenting more of the DDL.
2021-02-12 17:08:37 -08:00
Sean Corfield
49d8365bfb
Addresses #293 partial with-columns implementation
2021-02-10 22:32:29 -08:00
Sean Corfield
83d4ccba38
Addresses #293 start work on DDL support
2021-02-10 20:07:05 -08:00
Sean Corfield
e157aec976
Addresses #293 by adding over, partition-by, and window
2021-02-10 16:25:31 -08:00
Sean Corfield
5318c184e6
Addresses #293 by expanding insert-into behavior
...
This adds alias support into `:insert-into`.
It also adds some tests for the PostgreSQL-specific
stuff currently in nilenso's library.
2021-02-10 15:07:16 -08:00
Sean Corfield
e02b5b5c82
Revert "Document with / CTE"
...
This reverts commit c00fbffe30 .
2021-02-10 11:50:00 -08:00
Sean Corfield
9f579f492a
Allow symbols in for/lock clauses
2021-02-08 12:48:33 -08:00
Sean Corfield
88ec86fd18
Allow direction to default with expression
2021-02-07 04:47:08 -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
1d2b8e8203
Document special syntax
2021-02-02 16:43:09 -08:00
Sean Corfield
ea0bfbabc1
Outline of docs for clauses, operators, and special syntax
2021-02-02 14:50:12 -08:00
Sean Corfield
80c137949e
Initial Getting Started/Extending HoneySQL docs
2021-02-02 12:25:26 -08:00
Sean Corfield
4cbeb170dd
Ensure no dependence on vector (vs sequence)
2021-02-01 16:45:35 -08:00
Sean Corfield
d7c7f15a6b
Final de-?-ing keyword arguments/options
2021-02-01 16:24:00 -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
2ef9d4dad2
Docstring overhaul
2021-02-01 12:00:42 -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
0e2aae4a00
Fix :lift and test to use wrapper
2021-01-31 05:31:10 -08:00
Sean Corfield
c92656389b
Make params dynamic/implement in/not-in
2021-01-31 05:08:21 -08:00
Sean Corfield
429761f106
Fixes #261 by re-implementing :raw
2021-01-30 12:35:51 -08:00
Sean Corfield
67c6c3a2cf
Fixes #275 by dropping 1.7 & 1.8
2021-01-30 11:50:14 -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
d5b11e2da6
Implement JOIN USING
2021-01-30 11:00:34 -08:00
Sean Corfield
07eb66759a
Restore cljs compatibility
2021-01-30 17:27:00 -08:00