2.2.858 -- 2022-01-20
honey.sql/map=
to convert a hash map into an equality condition (for a WHERE
clause).:cache
option to honey.sql/format
(for Clojure only, not ClojureScript).SELECT * EXCEPT ..
and SELECT * REPLACE ..
and ARRAY<>
and STRUCT<>
column types -- see SQL Clause Reference - SELECT and SQL Clause Reference - DDL respectively for more details.build-clj
to v0.6.7.2.2.840 -- 2021-12-23
:nest
statement.:is
/ :is-not
-- this changes the behavior of [:is-not :col true/false]
to be correct and include NULL
values. Using :is
/ :is-not
with values that are not Boolean and not nil
will produce invalid SQL.build-clj
to v0.6.5.2.1.833 -- 2021-12-03
:select-distinct-on
differently.SELECT
and several other clauses, when :checking :basic
(or :strict
) is provided.build-clj
to v0.6.0.2.1.829 -- 2021-11-27
NOT
as a nested expression (so it is parenthesized unless it is a simple value).:nest
.honey.sql.helpers
namespace pointing out that all helper functions are variadic, they are all [& args]
, some have :arglists
metadata to provide a more specific usage hint but those all omit the optional first argument (the DSL hash map).DROP COLUMN IF EXISTS
/ ADD COLUMN IF NOT EXISTS
.build-clj
to v0.5.5.2.1.818 -- 2021-10-04
IS NULL
/ IS NOT NULL
tests.:values-default-columns
option to control whether missing columns are treated as NULL
or DEFAULT
in :values
clauses with sequences of hash maps.UNION
, EXCEPT
, etc were incorrectly parenthesized.build-clj
to v0.5.0.2.0.813 -- 2021-09-25
@
.:inline
syntax with the :inline true
option. A side effect of this is that [:inline [:param :foo]]
will now (correctly) inline the value of the parameter :foo
whereas it previously produced PARAMS SOURCE
. In addition, inlining has been extended to vector values, so [:inline ["a" "b" "c"]]
will now produce ('a', 'b', 'c')
and [:inline [:lift ["a" "b" "c"]]]
will now produce ['a', 'b', 'c']
which is what people seemed to expect (the behavior was previously unspecified).:create-table
.:quoted
argument to set-dialect!
.:add-index
.AS
aliasing in DELETE FROM
.readme
to test-doc-blocks
so all documentation is tested!2.0.783 -- 2021-08-15 (a.k.a "2.0 Gold")
SET
clause for the :mysql
dialect only; the behavior is unchanged for all other dialects.-
should retain the hyphen without special cases.:fetch
, :lift
, :limit
, :offset
, :param
, :select
; also around JSON/PostgreSQL.tools.build
for running tests and JAR building etc.2.0.0-rc5 (for testing; 2021-07-17)
OFFSET n ROWS
(or ROW
if n
is 1) if :fetch
is present or :sqlserver
dialect is specified; and by producing FETCH NEXT n ROWS ONLY
(or ROW
is n
is 1; or FIRST
instead of NEXT
if :offset
is not present).clojure.test
even for ClojureScript.:cross-join
documentation.fetch
helper (it previously returned an :offset
clause).with-columns
helper.2.0.0-rc3 (for testing; 2021-06-16)
:distinct
as special syntax, affecting an expression.&&
array operator.SELECT
a function expression (in Getting Started).test-runner
.2.0.0-rc2 (for testing; 2021-05-10)
ON
/USING
to be optional and not dropping parameters on the floor.%
function call syntax respect :quoted true
and/or :dialect
options, and also allowing for qualified column names. (PR from @lognush):quoted-snake true
option to force conversion from kebab-case to snake_case when :quoted true
or a :dialect
is specified to format
.test-runner
.2.0.0-rc1 (for testing; 2021-05-06)
insert-into
supports merging into another statement in all cases.:on-conflict
.:checking
mode. Currently only detects potential problems with IN
clauses.2.0.0-beta2 (for testing; 2021-04-13)
WHERE
/HAVING
merge logic. Important bug fix!FILTER
, WITHIN GROUP
, and ORDER BY
(as an expression), from nilenso/honeysql-postgres 0.4.112. These are Special Syntax and there are also helpers for filter
and within-group
-- so be careful about referring in all of honey.sql.helpers
since it will now shadow clojure.core/filter
(it already shadows for
, group-by
, into
, partition-by
, set
, and update
).join-by
(and correcting the helper docstring).2.0.0-beta1 (for testing; 2021-04-09)
where
/having
is broken in Beta 1!register-clause!
is idempotent.:set
clauses (just like we do with :insert
columns). Note that you can still use explicit dotted names if you want table qualification.;
(to avoid SQL injection risks).:raw
as a clause. There is no helper function equivalent (because it would be ambiguous whether you meant a function form -- [:raw ..]
-- or a clause form -- {:raw ..}
; and for the same reason, there is no nest
helper function since that also works as a clause and as a function/special syntax).2.0.0-alpha3 (for early testing; 2021-03-13)
com.github.seancorfield/honeysql
(although new versions will continue to be deployed to seancorfield/honeysql
for a while -- see the Clojars Verified Group Names policy).CREATE
/DROP
statements in general, including columns, TABLESPACE
, CASCADE
, WITH [NO] DATA
, etc.CREATE TABLE .. AS ..
.ON DUPLICATE KEY UPDATE
.CREATE
/DROP
/REFRESH
on MATERIALIZED VIEW
.SELECT .. INTO ..
and SELECT .. BULK COLLECT INTO ..
.SELECT TOP
and OFFSET
/FETCH
.LATERAL
(as special syntax, with a helper).where
behavior with recent 1.x changes (porting #283 to 2.x).:escape
as special syntax for regular expression patterns.:join-by
/join-by
so that you can have multiple JOIN
's in a specific order.2.0.0-alpha2 (for early testing)
honey.sql.helpers
.2.0.0-alpha1 (for early testing)
honey.sql
-- this is the primary API via the format
function as well as the various extension points.honey.sql.helpers
-- provides a helper function for every piece of the DSL that is supported out-of-the-box.com.github.seancorfield/honeysql
so it can be added to a project that already uses HoneySQL 1.x without any conflicts, making it easier to migrate piecemeal from 1.x to 2.x.1.0.461 -- 2021-02-22
merge-where
(and merge-having
) behavior. #282 via #283 (@camsaul)1.0.444 -- 2020-05-29
cross-join
/ merge-cross-join
/ :cross-join
. (@dcj)deps.edn
instead of Leiningen. Also add CI vi both CircleCI and GitHub Actions.next.jdbc
everywhere clojure.java.jdbc
was mentioned.0.9.10 -- 2020-03-06
except
. (@ted-coakley-otm)false
as well. (@ted-coakley-otm)deps.edn
, also multi-version clj testing and new readme
testing.0.9.9 -- 2020-03-02
0.9.8 -- 2019-09-07
honeysql.format/*namespace-as-table?*
and :namespace-as-table?
option to format
. (@seancorfield)0.9.7 -- 2019-09-07
honeysql.format/*allow-namespaced-names?*
to restore the previous behavior. A :allow-namespaced-names?
option has been adding to format
to set this more easily. (@seancorfield)set0
(:set0
) and set1
(:set1
) variants of sset
(:set
) to support different placements of SET
(before FROM
or after JOIN
respectively) that different databases require. See also #200. (@seancorfield)composite
/:composite
constructor for values. (@seancorfield)columns
/merge-columns
and throwing an exception if a single collection is supplied (instead of varargs). (@seancorfield)truncate
support. (@seancorfield)select
in the README that column names can be keywords or symbols but not strings. (@seancorfield)0.9.6 -- 2019-09-24
nil
conditions out of where
/merge-where
. Fix #246. (@seancorfield)0.9.5 -- 2019-09-07
format-predicate
now accepts parameterizer
as a named argument (default :jdbc
) to match format
. PR #234. (@glittershark)0.9.4 -- 2018-10-01
#sql/inline nil
should produce NULL
. Fix #221. (@seancorfield)#sql/inline :kw
should produce "kw"
. Fix #224 via PR #225. (@vincent-dm) Note: this introduces a new protocol, Inlinable
, which controls inline value rendering, and changes the behavior of #sql/inline :foo/bar
to produce just "bar"
(where it was probably invalid SQL before).[:col :alias]
are now checked to have exactly two elements. Fix #226. (@seancorfield)where
and merge-where
to be given no predicates. Fix #228 and PR #230. (@seancorfield, @arichiardi)as
alias is no longer split during quoting. Fix #221 and PR #231. (@gws)Not all of these releases were tagged on GitHub and none of them have release notes on GitHub. Releases prior to 0.5.0 were not documented (although some were tagged on GitHub).
0.9.3
#sql/raw
. Fix #219. (@seancorfield)raw
and inline
to the README. Fix #213. (@seancorfield)register-parameterizer
for custom parameterizers. PR #209. (@juvenn)set
priority to after join
. Fix #200. (@michaelblume)join ... using( ... )
. Fix #188, PR #201. (@vincent-dm)run-tests.sh
to make it easier to run the same tests manually that run on Travis-CI. (@seancorfield)deps.edn
to support clj
/tools.deps.alpha
. (@seancorfield)#sql/inline
data reader. (@seancorfield)0.9.2
nil
:and
arguments for where. Fix #203. (@michaelblume)select
formatting. Fix #198. (@visibletrap)INSERT INTO ... QUERY
. (@emidln):parameterizer
:none
for skipping next.jdbc
or clojure.java.jdbc
parameter generation. (@arichiardi)0.9.1
0.9.0 --
:with
and :with-recursive
clauses (@enaeher)0.8.2
0.8.1
0.8.0
0.7.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close