Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Corfield <[email protected]>
  • Loading branch information
seancorfield committed Mar 4, 2024
1 parent 2f159ac commit 51e64e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* 2.5.next in progress
* Address [#523](https://github.com/seancorfield/honeysql/issues/523) by expanding examples in README **Functions** to show aliases.
* Address [#522](https://github.com/seancorfield/honeysql/issues/522) by supporting metadata on table specifications in `:from` and `:join` clauses to provide index hints (SQL Server).
* Address [#521](https://github.com/seancorfield/honeysql/issues/521) by adding initial experimental support for an XTDB dialect.
* Address [#520](https://github.com/seancorfield/honeysql/issues/520) by expanding how `:inline` works, to support a sequence of arguments.
* Fix [#518](https://github.com/seancorfield/honeysql/issues/518) by moving temporal clause before alias.
* Address [#495](https://github.com/seancorfield/honeysql/issues/495) by adding (experimental) `format&` and `formatv` macros (`.clj` only!) -- purely for discussion: may be removed in a subsequent release!
* Address [#495](https://github.com/seancorfield/honeysql/issues/495) by adding (experimental) `formatv` macro (`.clj` only!) -- purely for discussion: may be removed in a subsequent release!
* Implemented `CREATE INDEX` [#348](https://github.com/seancorfield/honeysql/issues/348) via PR [#517](https://github.com/seancorfield/honeysql/pull/517) [@dancek](https://github.com/dancek).
* Mention `:not-in` explicitly in the documentation.
* Code cleanup per `clj-kondo`.
Expand Down
15 changes: 0 additions & 15 deletions src/honey/sql.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2108,21 +2108,6 @@
[dsl & params]
(format dsl {:params (zipmap (map (comp keyword str inc) (range)) params)}))

#?(:clj
(defmacro format&
"Experimental implementation of https://github.com/seancorfield/honeysql/issues/495
Implicitly treats any locally bound symbol as a variable to be substituted
in the symbolic SQL expression.
(let [x 42 y 13]
(format& '{select * from table where (= x y)}))
=> SELECT * FROM table WHERE (42 = 13)"
[dsl & opts]
(let [syms (vec (keys &env))]
`(honey.sql/format (clojure.template/apply-template '~syms ~dsl ~syms) ~@opts))))

#?(:clj
(defmacro formatv
"Experimental implementation of https://github.com/seancorfield/honeysql/issues/495
Expand Down

0 comments on commit 51e64e1

Please sign in to comment.