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

feat: support mutations #43

Merged
merged 3 commits into from
Oct 5, 2021
Merged

feat: support mutations #43

merged 3 commits into from
Oct 5, 2021

Conversation

olavloite
Copy link
Collaborator

Adds support for custom connection methods for using Mutations with the Spanner go-sql driver.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 29, 2021
if err := row.Scan(&name); err != nil {
return err
}
if err := con.Raw(func(driverConn interface{}) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is no txn here, I assume that in con, there is a txn context that is created by the previous call con.BeginTx, is this right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct. Unfortunately go-sql does not support executing something like tx.Raw, only conn.Raw.

Copy link
Collaborator

@hengfengli hengfengli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@olavloite olavloite merged commit 2d698b7 into main Oct 5, 2021
@olavloite olavloite deleted the mutations branch October 5, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants