remove experimental xtdb dialect - no longer needed

Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
Sean Corfield 2024-11-23 18:26:53 -08:00
parent 42d5f4baf1
commit f2763d5af5
No known key found for this signature in database
3 changed files with 6 additions and 22 deletions

View file

@ -1,5 +1,8 @@
# Changes
* 2.6.next in progress
* Experimental `:xtdb` dialect removed (since XTDB no longer supports qualified column names).
* 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 [#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 [#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 [#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.
* 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).

View file

@ -119,10 +119,7 @@
:nrql {:quote #(strop "`" % "`")
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
:parts-fn vector}
:oracle {:quote #(strop "\"" % "\"") :as false}
:xtdb {:quote #(strop "\"" % "\"")
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
:parts-fn #(str/split % #"\.")}})))
:oracle {:quote #(strop "\"" % "\"") :as false}})))
; should become defonce
(def ^:private default-dialect (atom (:ansi @dialects)))

View file

@ -1,28 +1,12 @@
;; copyright (c) 2020-2024 sean corfield, all rights reserved
(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.helpers :as h
: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
(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"
(is (= ["SELECT * EXCLUDE _id RENAME value AS foo_value FROM foo"]
(sql/format (-> (select :*) (exclude :_id) (rename [:value :foo_value])