Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

upsert/merge wont work with postgres #10

Closed
mren opened this Issue · 3 comments

3 participants

Mark Engel Thiago Souza snd
Mark Engel

upsert

currently only the mysql special syntax ON DUPLICATE KEY UPDATE is supported

some reference on stackoverflow on this topic

snd snd closed this issue from a commit
snd add upsert
closes #10
63dc2a4
snd snd closed this in 63dc2a4
Thiago Souza

Hi there,

What happened with this feature? Can't see it in master...

Thanks

snd
Owner

hi thiago,

this issue is from before the rewrite where the api and goal of mohair changed a lot (version 0.8).

upsert differs from mysql to postgres.
we are using mohair in some projects using postgres and in some legacy projects using mysql.
i decided to keep mohair free from database specific extensions to sql.

after talking to mren about it in person i closed the issue.
i should have documented it here.

if you really need it feel free to write me and reopen the issue.
i will then look into seperating mysql specific features from the core and adding clean support for upsert.

Thiago Souza

Hello there,

Thanks for your feedback! I understand that this is implementation specific and could be dangerous if a project needs portability. I'll try to implement this using transactions in standard way.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.