sql

All things SQL and JDBC...
Ashwin Bhaskar 2021-01-08T04:19:02.081100Z

(sql/update! ds
                           :my-table
                           {:started-at (Instant/now)}
                           {:id         id}
                           {:column-fn  csk/->snake_case
                            :table-fn   csk/->snake_case
                            :builder-fn rs/as-unqualified-kebab-maps})
returns
#:next.jdbc{:update-count 0}
Even thought I gave the builder-fn to return as maps. Why does this happen?

seancorfield 2021-01-08T05:14:40.081500Z

@ashwinbhskr I'm not sure what you're asking here?

seancorfield 2021-01-08T05:15:11.082200Z

What do you expect to be returned here? An UPDATE statement returns the number of rows affected.

Ashwin Bhaskar 2021-01-08T05:16:24.083500Z

> What do you expect to be returned here? An `UPDATE` statement returns the number of rows affected. true, I should I have been clearer with my question. I meant to ask why does it return a namespaced key word? instead of just {:update-count 0}

seancorfield 2021-01-08T05:18:37.084100Z

As the docs make clear, the "fake" result set returned in this case is not affected by the builder fn you specify.

👍 1