Fork me on GitHub
#sql
<
2021-05-31
>
omendozar23:05:50

Hi, how can I update multiple rows with next.jdbc?  Having an ENUM type and a table for codes:

create type code_status as ENUM ('active', 'sold');

create table codes (
 id serial not null primary key,
 code text not null unique,
 status code_status not null default 'active'
);
I need to update multiple codes in a single statement. The function receives this coll:
[{:code "VF8967" :status "sold"}
 {:code "VF6675" :status "sold"}]