feat: delay transaction start option by olavloite · Pull Request #2462 · googleapis/java-spanner (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to set the transactionStarted
, and we need to verify that the transaction is in a valid state, so we can't skip it altogether. Also; the method takes a ParsedStatement
as an input argument so it can check the type of statement, and we don't have a SQL statement that is equivalent with writing/buffering mutations.
What we can however do is slightly rearrange the methods so we have a separate method only for verifying the valid state of the transaction and marking it as started, but skipping the creation of the underlying transaction. I've changed it to that.