Given an enum type e_role
, being represented in clojure-land as a string, use the enum in a query and typecast inside it.
Note the ?::e_role
:
INSERT INTO accounts (account_id, email, password, account_role)
VALUES (DEFAULT, :email, :password, ?::e_role);
Use positional arguments for the enum(s) (note the :? [..]
):