-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
examples/mutations/main.go
Outdated
if err := row.Scan(&name); err != nil { | ||
return err | ||
} | ||
if err := con.Raw(func(driverConn interface{}) error { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Adds support for custom connection methods for using
Mutation
s with the Spanner go-sql driver.