remove experimental xtdb dialect - no longer needed
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
42d5f4baf1
commit
f2763d5af5
3 changed files with 6 additions and 22 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
* 2.6.next in progress
|
||||||
|
* Experimental `:xtdb` dialect removed (since XTDB no longer supports qualified column names).
|
||||||
|
|
||||||
* 2.6.1230 -- 2024-11-23
|
* 2.6.1230 -- 2024-11-23
|
||||||
* Fix [#553](https://github.com/seancorfield/honeysql/issues/553) by adding `:not-between` as special syntax via PR [#554](https://github.com/seancorfield/honeysql/pull/554) [@plooney81](https://github.com/plooney81)
|
* Fix [#553](https://github.com/seancorfield/honeysql/issues/553) by adding `:not-between` as special syntax via PR [#554](https://github.com/seancorfield/honeysql/pull/554) [@plooney81](https://github.com/plooney81)
|
||||||
* Fix [#552](https://github.com/seancorfield/honeysql/issues/552) by changing the assert-on-load behavior into an explicit test in the test suite.
|
* Fix [#552](https://github.com/seancorfield/honeysql/issues/552) by changing the assert-on-load behavior into an explicit test in the test suite.
|
||||||
|
|
@ -43,7 +46,7 @@
|
||||||
* Address [#524](https://github.com/seancorfield/honeysql/issues/524) by adding example of `{:nest ..}` in `:union` clause reference docs.
|
* Address [#524](https://github.com/seancorfield/honeysql/issues/524) by adding example of `{:nest ..}` in `:union` clause reference docs.
|
||||||
* Address [#523](https://github.com/seancorfield/honeysql/issues/523) by expanding examples in README **Functions** to show aliases.
|
* 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 [#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 [#521](https://github.com/seancorfield/honeysql/issues/521) by adding initial experimental support for an XTDB dialect.~ _[This was removed in 2.6.next since XTDB no longer supports qualified column names]_
|
||||||
* Address [#520](https://github.com/seancorfield/honeysql/issues/520) by expanding how `:inline` works, to support a sequence of arguments.
|
* 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.
|
* 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 `formatv` macro (`.clj` only!) -- and removing the experimental `formatf` function (added for discussion in 2.4.1045).
|
* Address [#495](https://github.com/seancorfield/honeysql/issues/495) by adding `formatv` macro (`.clj` only!) -- and removing the experimental `formatf` function (added for discussion in 2.4.1045).
|
||||||
|
|
|
||||||
|
|
@ -119,10 +119,7 @@
|
||||||
:nrql {:quote #(strop "`" % "`")
|
:nrql {:quote #(strop "`" % "`")
|
||||||
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
|
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
|
||||||
:parts-fn vector}
|
:parts-fn vector}
|
||||||
:oracle {:quote #(strop "\"" % "\"") :as false}
|
:oracle {:quote #(strop "\"" % "\"") :as false}})))
|
||||||
:xtdb {:quote #(strop "\"" % "\"")
|
|
||||||
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
|
|
||||||
:parts-fn #(str/split % #"\.")}})))
|
|
||||||
|
|
||||||
; should become defonce
|
; should become defonce
|
||||||
(def ^:private default-dialect (atom (:ansi @dialects)))
|
(def ^:private default-dialect (atom (:ansi @dialects)))
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,12 @@
|
||||||
;; copyright (c) 2020-2024 sean corfield, all rights reserved
|
;; copyright (c) 2020-2024 sean corfield, all rights reserved
|
||||||
|
|
||||||
(ns honey.sql.xtdb-test
|
(ns honey.sql.xtdb-test
|
||||||
(:require [clojure.test :refer [deftest is testing use-fixtures]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[honey.sql :as sql]
|
[honey.sql :as sql]
|
||||||
[honey.sql.helpers :as h
|
[honey.sql.helpers :as h
|
||||||
:refer [select exclude rename from where]]))
|
:refer [select exclude rename from where]]))
|
||||||
|
|
||||||
(use-fixtures :once (fn [t]
|
|
||||||
(try
|
|
||||||
(sql/set-dialect! :xtdb)
|
|
||||||
(t)
|
|
||||||
(finally
|
|
||||||
(sql/set-dialect! :ansi)))))
|
|
||||||
|
|
||||||
(deftest select-tests
|
(deftest select-tests
|
||||||
(testing "qualified columns"
|
|
||||||
(is (= ["SELECT \"foo\".\"bar\", \"baz/quux\""]
|
|
||||||
(sql/format {:select [:foo.bar :baz/quux]} {:quoted true})))
|
|
||||||
(is (= ["SELECT \"foo\".\"bar\", \"baz/quux\""]
|
|
||||||
(sql/format {:select [:foo.bar :baz/quux]} {:dialect :xtdb})))
|
|
||||||
(is (= ["SELECT foo.bar, \"baz/quux\""]
|
|
||||||
(sql/format {:select [:foo.bar :baz/quux]})))
|
|
||||||
(is (= ["SELECT foo.bar, baz/quux"]
|
|
||||||
(sql/format {:select [:foo.bar :baz/quux]} {:quoted false}))))
|
|
||||||
(testing "select, exclude, rename"
|
(testing "select, exclude, rename"
|
||||||
(is (= ["SELECT * EXCLUDE _id RENAME value AS foo_value FROM foo"]
|
(is (= ["SELECT * EXCLUDE _id RENAME value AS foo_value FROM foo"]
|
||||||
(sql/format (-> (select :*) (exclude :_id) (rename [:value :foo_value])
|
(sql/format (-> (select :*) (exclude :_id) (rename [:value :foo_value])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue