selda icon indicating copy to clipboard operation
selda copied to clipboard

Lack of posibility to upsert whole row, or it is poorly documented.

Open majkrzak opened this issue 5 years ago • 0 comments

I was implementing insert or update operation when encountered an issue with upsert/update function.

When upserting foo::Foo I would expect to be able to do it like:

upsert tbl [foo]

Anyway, in current implementation it gets a bit more complicated due to the "update" function: (Row (Backend m) a -> Row (Backend m) a). Only way described in the docs is to use when :: Row s a -> [Assignment s a] -> Row s a . Unfortunately it requires list of assignments, when I have only full foo.

IMO, the best way will be to provide (or document if it exists) mystery_name:: a -> Row s a.

majkrzak avatar Nov 01 '20 16:11 majkrzak