Sean Corfield
ed844ed057
add snapshot on deploy
2021-09-25 17:51:48 -07:00
lread
cccd3e96fd
Doc block testing now understands refer-clojure
...
Test-doc-blocks added support for this feature
2021-08-30 17:40:25 -04:00
lread
35c5aee584
Test code blocks in docs with test-doc-blocks
...
Resolves #290
**Build**
New commands:
- `gen-doc-tests` - only regenerates tests if stale,
use `clean` command to force regen
- `run-doc-tests` - calls gen-doc-tests then runs tests,
accepts the same parameters as run-tests.
Can specify `:platform`
- `:cljs` - run tests under ClojureScript
- otherwise Clojure where we can specify one of: `:1.9`
`:1.10` `:master`
I'm not sure if my use of the `:platform` parameter jives with
your `:aliases` parameter used for `run-tests`.
Can adjust if you like.
Example usages:
```shell
clojure -T:build gen-doc-tests
clojure -T:build run-doc-tests :platform :cljs
clojure -T:build run-doc-tests
clojure -T:build run-doc-tests :platform :1.10
```
The `ci` command has been updated to generate and run doc tests for same
platforms as unit tests.
**Articles**
In addition to `README.md`, now testing doc blocks in all articles
under `doc` dir excepting `doc/operator-reference.md` which does not
have any runnable code blocks.
**Skipped**
Any code block that is intentionally not runnable has been marked to be
skipped via: `<!-- :test-doc-blocks/skip -->`.
**Consistency**
I noticed that some code blocks use REPL syntax:
```Clojure
user=> (+ 1 2 3)
6
```
and others use editor syntax:
```Clojure
(+ 1 2 3)
;;=> 6
```
some places also omit the comment for editor style:
```Clojure
(+ 1 2 3)
=> 6
```
All of this is just fine with test-doc-blocks.
I left the inconsistency as is, but can make a pass for consistency upon
request.
**HoneySQL state**
I noticed a code block that set the sql dialect was affecting other
tests. I simply restored the dialect to the default at the end of the
code block.
**Un-tweaked output**
Some code blocks had string output hand-tweaked for readability.
These have been adjusted to instead use `sql/format`'s `:pretty` option.
In some cases the output is not as readable as the hand-tweaked version.
I humbly suggest that perhaps `:pretty` output could perhaps be
improved (instead of having test-doc-blocks somehow adapt).
**Corrections**
There were very few code blocks that required fixing due to incorrect
output/code. Please review the diffs carefully to make sure all is as
expected.
**refer-clojure :excludes**
Not currently supported for test-doc-blocks, not a real issue for
Clojure, we'll see warnings under Clojure, but that's probably ok.
But I might actually need it for ClojureScript.
I was finding that `for` did not get overridden by our helper
`:refer` in CloureScript.
Will add proper support to test-doc-blocks but in the short-term,
will use `h/for`.
**ns requires adjustments**
Any specific case of `(ns my-ns (require [my-require :as a]))` is now
the REPL friendly `(require '[my-require :as a])`
Any missing required `requires` were added.
The HoneySQL docs seem to encourage the use of referred vars for
helpers. Although this has the con of overlaps with Clojure core vars,
it is also convenient for Clojure when using `:refer :all`.
**ClojureScript :refer**
ClojureScript does not support `:refer :all` and each var must be
specified in place of `:all`.
I have adjusted examples accordingly to work with both Clojure and
ClojureScript.
2021-08-27 18:39:07 -04:00
Sean Corfield
943b9547c9
Add Open in Gitpod badge/link
2021-08-17 22:49:43 -07:00
Sean Corfield
ee65201cfc
prep for 2.0 Gold (2.0.783)
2021-08-15 11:27:09 -07:00
Sean Corfield
dabb501e4b
fix typos in readme
2021-08-12 18:34:18 -07:00
Sean Corfield
249ab639ec
Add links to HoneySQL web app
2021-08-06 11:35:53 -07:00
Sean Corfield
904af73505
Fixes #339 by calling out param/lift for JSON usage
2021-07-18 16:36:11 -07:00
Sean Corfield
01c3a555ba
prep for RC 5(!)
2021-07-17 18:00:02 -07:00
Sean Corfield
679a0309db
prep for 2.0.0-rc4
2021-07-17 14:25:55 -07:00
John Shaffer
d89cdb52d5
Add multiple join to big complicated map example.
2021-06-18 21:43:01 -05:00
Sean Corfield
a2ee638b3b
prep for 2.0.0-rc3
2021-06-16 23:01:33 -07:00
Sean Corfield
0d5f416de8
Fix cljdoc links
2021-05-20 12:05:32 -07:00
Sean Corfield
f1ed7f0c90
Add links back to 1.x in README
2021-05-20 11:54:52 -07:00
Sean Corfield
fb60113858
Merge branch 'v2' into develop
2021-05-19 17:45:13 -07:00
Sean Corfield
9f5b552ad0
Add GH Actions CI badge for v2
2021-05-11 18:32:43 -07:00
Sean Corfield
31a613b84c
Add GiHub Actions CI badge
2021-05-11 18:31:35 -07:00
Sean Corfield
81fda8592d
Prep for 2.0.0 RC 2
2021-05-10 22:51:41 -07:00
Sean Corfield
7761867852
Note RC of V2
2021-05-08 18:15:42 -07:00
Sean Corfield
11fcfd5257
Prep for 2.0.0-rc1
2021-05-06 22:12:46 -07:00
Sean Corfield
97e8007068
Link to V2
2021-04-29 22:30:28 -07:00
Sean Corfield
e227e1b9ab
Prep for 2.0.0-beta2
2021-04-13 12:55:40 -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
862a2496c6
Consistent use of 1.x / 2.x
2021-04-11 11:09:47 -07:00
Sean Corfield
35c6fc58a5
Prep for 2.0.0 Beta 1
2021-04-09 23:51:31 -07:00
Sean Corfield
d76b2d82b1
Prep for 2.0 Alpha 3
2021-03-13 15:55:31 -08:00
Sean Corfield
9f6393a2fd
Fix README now into is a helper function
2021-03-13 13:46:47 -08:00
Sean Corfield
97c9236842
Fixes #307 by adding data DSL examples
...
I've added a pure data DSL version of nearly all the helper function
examples. I've added a few examples of the data DSL with symbols instead
of keywords as well.
2021-03-07 17:07:38 -08:00
Sean Corfield
d789c00f54
Reflect latest 1.x version
2021-03-07 09:45:08 -08:00
Sean Corfield
41522c89a1
Clarify 1.9+ Clojure support
2021-03-07 09:43:03 -08:00
Sean Corfield
9f2fe5e9d4
Fixes #299 by treating seqs in VALUES differently
2021-02-22 11:02:19 -08:00
Sean Corfield
b0782b93dd
Prep for 2.0.0-alpha2
2021-02-16 11:43:18 -08:00
Sean Corfield
efa2fe6af5
Fix v2 badge
2021-02-14 10:59:41 -08:00
Sean Corfield
66d9f9dacb
Fix some version-related links
2021-02-14 10:45:49 -08:00
Sean Corfield
e585ded37e
Restore upsert helper for #293
2021-02-13 19:08:40 -08:00
Sean Corfield
f6975ef6bd
Fix select as, select distinct on
2021-02-13 15:58:56 -08:00
Sean Corfield
1b749c1599
Overhaul differences document
2021-02-01 16:24:19 -08:00
Sean Corfield
469e5a393e
Link to differences; fix clojars/cljdoc links etc
2021-02-01 15:09:27 -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
1f4c4ff7ba
Show :lift example in :raw
2021-01-30 12:42:08 -08:00
Sean Corfield
429761f106
Fixes #261 by re-implementing :raw
2021-01-30 12:35:51 -08:00
Sean Corfield
4af4f3f7ed
Fixes #274 by committing to seancorfield/honeysql for v2
2021-01-30 11:59:35 -08:00
Sean Corfield
d0f3068f3f
Minor README update around raw
2021-01-30 11:00:22 -08:00
Sean Corfield
07eb66759a
Restore cljs compatibility
2021-01-30 17:27:00 -08:00
Sean Corfield
87eec786e1
It's 2021
2021-01-29 16:11:52 -08:00
Sean Corfield
0880d0212f
Minor version/tooling updates
2021-01-29 13:17:01 -08:00
Sean Corfield
e8196e266d
Add caveat about strings in parameterizer none
2020-12-15 10:16:38 -08:00
Sean Corfield
57dbfaad48
Add example from PR #287 to v2 README
2020-12-15 10:12:39 -08:00
Yehonathan Sharvit
94765ca7db
Mention how to disable paremeterization
2020-12-15 14:21:07 +02:00
Sean Corfield
ccd5447a09
Format sequential values as full SQL expressions
2020-10-12 11:33:18 -07:00
Sean Corfield
2decf35072
Fix most of the README formatting
2020-10-09 23:59:43 -07:00
Sean Corfield
98b18bbb6e
Fix where/having helpers; add select-distinct
2020-10-09 23:05:05 -07:00
Sean Corfield
a83998d354
Documented extension mechanism; updated README
...
Helpers are the next big piece of work.
2020-10-09 22:31:55 -07:00
Sean Corfield
9f8d1a8564
Implement :?foo [:param :foo] and primitive [:raw "sql"]
2020-10-01 23:30:18 -07:00
Sean Corfield
8b2f0ef292
Add locking select support via for/lock
2020-09-28 20:45:43 -07:00
Sean Corfield
867d5d3482
Implement composite; clean up readme
2020-09-28 19:24:17 -07:00
Sean Corfield
6aced04179
Address #266 by adding :pretty? true option
...
Adds newline before, after, and between each SQL clause.
2020-09-25 23:58:51 -07:00
Sean Corfield
1c7e08bb82
A first pass over the README for V2
2020-09-24 20:49:22 -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
e6ca5c7d15
Adjust CircleCI links
2020-06-16 11:32:23 -07:00
Sean Corfield
1e45fdff28
Prep for 1.0.444 release
2020-05-29 16:10:16 -07:00
Sean Corfield
919ffb3c4b
Add CI badge; update change log
2020-05-29 13:41:27 -07:00
Sean Corfield
8af9790cf0
Update links after repo transfer
2020-05-29 12:25:49 -07:00
scott-silver
6f6fd0aef5
Update README.md
...
typo
2020-05-07 08:28:44 -07:00
Sean Corfield
ac92047d5e
Refer/link to next.jdbc as appropriate
2020-03-08 15:40:08 -07:00
Sean Corfield
1c4b36f6dc
Removed CircleCI badge; refer to new readme tester
...
The CircleCI badge will come back once it is set up there.
2020-03-08 15:19:54 -07:00
Sean Corfield
6e68bb9122
Switch dev/test infrastructure from Leiningen to CLI/deps.edn
2020-03-08 15:17:18 -07:00
Ted Coakley
e7dce6b347
Adds support for except set operation #254
2020-03-06 17:34:06 +00:00
Sean Corfield
5bc1fafddd
Switch to seancorfield/readme for deps.edn run
2020-03-02 23:20:08 -08:00
Sean Corfield
ed20b39056
Merge branch 'master' of github.com:jkk/honeysql
2020-02-12 12:10:42 -08:00
Sean Corfield
d7e5e3f050
Group (by) example now has more than one column
2020-02-12 12:10:24 -08:00
JC
3ca332f111
docs: section up Readme for permalinkability
2020-02-07 13:49:32 -08:00
JC
5441cb5488
docs: clarify SQL AND
2020-02-07 10:31:57 -08:00
Sean Corfield
370ff4f45d
Add PostGIS example
...
A lot of people ask about this so having it in the README should help
head off those questions!
2019-10-19 12:12:23 -07: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
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
7831ebed38
Fixes #128 by adding :truncate / truncate
2019-09-07 13:24:46 -07:00
Sean Corfield
4fbf69e59e
Fixes #99 by clarifying column names in the readme
2019-09-07 13:14:36 -07:00
Sean Corfield
29aa1670e5
Expand Extensibility section
...
Add `register-clause!`. Add note about standard (ANSI) vs. non-standard
SQL extensions.
2019-03-25 14:40:00 -07:00
Sean Corfield
cd5824a126
Narrow the Zulip chat URL
...
Link directly to the stream.
2019-02-11 14:36:53 -08:00
Thiago Lewin
97609cdb45
Fix a typo in the Extensibility section
...
The current version doesn't work and returns a non-obvious error message:
```
interface honeysql.format.ToSql is not a protocol
```
2018-12-31 00:38:17 +01:00
Sean Corfield
ceac686fd2
Link to Zulip
2018-11-21 14:43:16 -08:00
Sean Corfield
b3dd0d1287
Clarify sset example with sql/call #227
2018-09-27 13:00:58 -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
Sean Corfield
0c44eaa6e7
Fix #215 by adding select alias example
2018-06-25 13:00:42 -07:00
Sean Corfield
cc9b786602
Fix #213 by add raw/inline explanations to README
2018-06-25 12:30:48 -07:00
Daniel Compton
dfcaf1c8e9
Add Deps Versions dependency status
2017-12-18 21:35:48 +13:00
Colin Yates
b105b2f2e5
Added doc to use custom datatypes re: #177 ( #179 )
2017-08-26 11:39:04 -07:00
Vincent Storme
36239778ef
Update copywrite year to current
...
... it's almost 2018
2017-08-26 11:27:03 -07:00
Michael Blume
a9dffec632
update jdbc example
2017-08-20 22:44:06 -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
e213364012
Update README to better reflect reality
2017-07-18 22:47:08 -07:00
Michael Blume
db32c8a654
match close parens in README
2017-05-20 21:47:05 -07:00
Michael Blume
2088a198e9
clarify in README that honeysql just generates sql
...
and has nothing to do with your db connection
Fix #148 ?
2017-05-20 21:45:20 -07:00
Richard Newman
29f3cd1099
Update README example to match #142 .
2016-11-06 12:29:37 -08:00