Sorry, I did not notice the alphabetical order.
NP. I'm just really anal about that sort of thing. I ding my colleagues about it in PRs π
I really appreciate that you took the trouble to send a PR in the first place!
Are namepsaces keywords useful in any way with next.jdbc.sql/update!
?
I am asking, because I want to do fn like this
(defn update-by-uuid! [table data] (sql/update! db table data {:uuid (:uuid data}))
And I hav concern about :uuid
, because here will be :shop/uuid
os something else.So I have to remove all namespaces keyword here to make this simple
just thinking if I lose any advantage because of this here?
You are over-thinking. The docs talk about this and you can pass qualified or unqualified names and both will work in update!
etc @kwladyka
You should stop worrying about qualified keywords and just get used to them π
In other words, both of the following will work:
(defn update-by-uuid! [table data] (sql/update! db table data {:shop/uuid (:uuid data}))
(defn update-by-uuid! [table data] (sql/update! db table data {:uuid (:uuid data}))
and so would
(defn update-by-uuid! [table data] (sql/update! db table data (select-keys data [:uuid]))) ; if data has simple keys
(defn update-by-uuid! [table data] (sql/update! db table data (select-keys data [:shop/uuid]))) ; if data has qualified keys
The whole point (of next.jdbc
working this way) is to allow you to use qualified keys easily.that is what I was thinking, but wanted to be sure if I donβt lose some not obviously advantages