fix #387 properly
This commit is contained in:
parent
beedc35a22
commit
f711b934fa
3 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# Changes
|
||||
|
||||
* 2.2.next in progress
|
||||
* Fix [#387](https://github.com/seancorfield/honeysql/issues/387) again.
|
||||
|
||||
* 2.2.868 -- 2022-02-21
|
||||
* Address [#387](https://github.com/seancorfield/honeysql/issues/387) by making the function simpler.
|
||||
* Fix [#385](https://github.com/seancorfield/honeysql/issues/385) by quoting inlined UUIDs.
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
|
||||
Hyphens at the start or end of a string should not be touched."
|
||||
[s]
|
||||
(str/replace s #"(\w)-(\w)" "$1 $2"))
|
||||
(str/replace s #"(\w)-(?=\w)" "$1 "))
|
||||
|
||||
(defn- namespace-_
|
||||
"Return the namespace portion of a symbol, with dashes converted."
|
||||
|
|
|
|||
|
|
@ -868,6 +868,13 @@ ORDER BY id = ? DESC
|
|||
{:dialect :sqlserver})))))
|
||||
|
||||
(deftest sql-kw-test
|
||||
(is (= "-" (sut/sql-kw :-)))
|
||||
(is (= "-X" (sut/sql-kw :-x)))
|
||||
(is (= "X-" (sut/sql-kw :x-)))
|
||||
(is (= "-X-" (sut/sql-kw :-x-)))
|
||||
(is (= "A B" (sut/sql-kw :a-b)))
|
||||
(is (= "A B C" (sut/sql-kw :a-b-c)))
|
||||
(is (= "A B C D" (sut/sql-kw :a-b-c-d)))
|
||||
(is (= "FETCH NEXT" (sut/sql-kw :fetch-next)))
|
||||
(is (= "WHAT IS THIS" (sut/sql-kw :what-is-this)))
|
||||
(is (= "FEE FIE FOE FUM" (sut/sql-kw :fee-fie-foe-fum)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue