feature(spanner): Implement DML Support for Spanner #1197
+368
−63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #135
Closes #775
Closes #918
Closes #1194
Supersedes the following PRs #733, #910, #924
This PR implements DML support and uses the
memefish
lexer to parse the migrations, replacing the usage of thespansql
package. As a result, numerous otherspansql
related issues have been resolved.The following features have been implemented:
To maintain backward compatibility, the
x-clean-statements
option must be used to enable the above features.This PR also fixes a bug where a provided spanner client via
WithInstance()
is closed whenMigration.Close()
is called. According to Docs, the caller is responsible for closing the underlying database client. This fix brings the Spanner driver into compliance with the expected behavior.I am maintaining a fork with this fix for those who would like to use it.
Put the following replace directive you your projects
go.mod