I'm trying to create a query like:
INSERT INTO users (id, level)
VALUES (1, 0)
ON CONFLICT (id) DO UPDATE
SET level = users.level + 1;
However I can't see how to do this with opaleye? Is this not supported?
Strangely we have Insert
defined with a field of iOnConflict :: Maybe OnConflict
. However OnConflict
is defined as: data OnConflict = DoNothing
so it just looks like a placeholder for now?
Following through the issue listed on github, I see it leads to this eventual PR: https://github.com/tomjaguarpaw/haskell-opaleye/pull/385/files but I can't really make sense of it? I'm not sure if it's implementing just the placeholder, or it actually implements the functionality.