We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The statment of UPSERT in postgres:
INSERT INTO ... ON CONFLICT ON CONSTRAINT DO UPDATE ...
Currently in https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L16, command only takes in first word.
And for INSERT Case, there is only RowsAffected = 1 option if do not identify the error. https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L86
Proposed solution, one of the two will work for postgres.
detect whether there is a update followed by insert
instead of checking command using first word, do a backward search of the key words lists.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The statment of UPSERT in postgres:
INSERT INTO ... ON CONFLICT ON CONSTRAINT DO UPDATE ...
Currently in
https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L16, command only takes in first word.
And for INSERT Case, there is only RowsAffected = 1 option if do not identify the error.
https://github.com/Selvatico/go-mocket/blob/master/stmt.go#L86
Proposed solution, one of the two will work for postgres.
detect whether there is a update followed by insert
instead of checking command using first word, do a backward search of the key words lists.
The text was updated successfully, but these errors were encountered: