Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
majkrzak opened this issue Nov 1, 2020 · 0 comments
Open

Comments

@majkrzak
Copy link

majkrzak commented Nov 1, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant