address #353 for create table/string entity
This commit is contained in:
parent
ec758dd818
commit
c7c6102661
2 changed files with 9 additions and 13 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -15,10 +15,10 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
- name: Clojure CLI 1.10.3.933
|
- name: Clojure CLI
|
||||||
uses: DeLaGuardo/setup-clojure@master
|
uses: DeLaGuardo/setup-clojure@master
|
||||||
with:
|
with:
|
||||||
tools-deps: '1.10.3.933'
|
tools-deps: '1.10.3.967'
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: clojure -T:build ci
|
run: clojure -T:build ci
|
||||||
- name: Check cljdoc.edn
|
- name: Check cljdoc.edn
|
||||||
|
|
|
||||||
|
|
@ -220,18 +220,13 @@
|
||||||
(if *quoted-snake* name-_ name)
|
(if *quoted-snake* name-_ name)
|
||||||
name-_)
|
name-_)
|
||||||
quote-fn (if (or *quoted* (string? e)) (:quote *dialect*) identity)
|
quote-fn (if (or *quoted* (string? e)) (:quote *dialect*) identity)
|
||||||
[table col] (if-let [n (when-not (or drop-ns (string? e))
|
parts (if-let [n (when-not (or drop-ns (string? e))
|
||||||
(namespace-_ e))]
|
(namespace-_ e))]
|
||||||
[n (col-fn e)]
|
[n (col-fn e)]
|
||||||
(if aliased
|
(if aliased
|
||||||
[nil (col-fn e)]
|
[(col-fn e)]
|
||||||
(let [[t c] (str/split (col-fn e) #"\.")]
|
(str/split (col-fn e) #"\.")))
|
||||||
(if c [t c] [nil t]))))
|
entity (str/join "." (map #(cond-> % (not= "*" %) (quote-fn)) parts))
|
||||||
entity (cond->> col
|
|
||||||
(not= "*" col)
|
|
||||||
(quote-fn)
|
|
||||||
table
|
|
||||||
(str (quote-fn table) "."))
|
|
||||||
suspicious #";"]
|
suspicious #";"]
|
||||||
(when-not *allow-suspicious-entities*
|
(when-not *allow-suspicious-entities*
|
||||||
(when (re-find suspicious entity)
|
(when (re-find suspicious entity)
|
||||||
|
|
@ -743,8 +738,9 @@
|
||||||
(if (sequential? table)
|
(if (sequential? table)
|
||||||
table
|
table
|
||||||
[table])
|
[table])
|
||||||
coll (take-while ident? params)
|
tab? #(or (ident? %) (string? %))
|
||||||
opts (drop-while ident? params)
|
coll (take-while tab? params)
|
||||||
|
opts (drop-while tab? params)
|
||||||
ine (last coll)
|
ine (last coll)
|
||||||
[prequel table ine]
|
[prequel table ine]
|
||||||
(if (= :if-not-exists (sym->kw ine))
|
(if (= :if-not-exists (sym->kw ine))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue