spanner/spansql: support for Update in parseDMLStmt #3162
Labels
api: spanner
Issues related to the Spanner API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
Currently
spannertest
seems to be unusable withUPDATE
SQL queries.parseDMLStmt()
inspansql/parser.go
seems to only supportDELETE
. There is aTODO: Insert, Update
comment, but I was unable to find an associated feature request issue for this and not sure if it is planned, hence this request to put it on the roadmap. Relevant line: https://github.com/googleapis/google-cloud-go/blob/master/spanner/spansql/parser.go#L1284Describe the solution you'd like
I would like for
UPDATE
DML to be parsed viaspansql
, which would enable us to properly test these statements viaspannertest
. IdeallyINSERT
would be parsed as well, but asUPDATE
is more relevant for our immediate purpose I am focusing on that one here.Describe alternatives you've considered
An alternative would be to update via an Update mutation instead. We will likely go with this solution for the time being, but being forced to change the implementation to a mutation solely to account for missing test functionality does not seem ideal.
Thanks!
The text was updated successfully, but these errors were encountered: