Skip to content

Commit

Permalink
guard against uncomparable values
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Corfield <[email protected]>
  • Loading branch information
seancorfield committed Sep 28, 2024
1 parent 3ca197b commit 7c0e25f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/honey/sql.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,9 @@

(defn- format-values [k xs]
(let [first-xs (when (sequential? xs) (first (drop-while ident? xs)))
row-ctr (and (sequential? xs) (contains? #{:row 'rows} (first xs)))
row-ctr (and (sequential? xs)
(ident? (first xs))
(contains? #{:row 'rows} (first xs)))
xs (if row-ctr (rest xs) xs)]
(cond (and (ident? xs) (contains? #{:default 'default} xs))
[(str (sql-kw xs) " " (sql-kw k))]
Expand Down

0 comments on commit 7c0e25f

Please sign in to comment.