feat: add support for QueryOptions#846
Conversation
skuruppu
left a comment
There was a problem hiding this comment.
LGTM
If you can update the PR description to:
- List the precedence
- Mention the env var name
that would be great.
proto/spanner.d.ts
Outdated
|
|
||
| /** ExecuteSqlRequest resumeToken */ | ||
| resumeToken?: (Uint8Array|null); | ||
| resumeToken?: (Uint8Array|string|null); |
There was a problem hiding this comment.
I assume these are auto-generated changes?
There was a problem hiding this comment.
Yes, although it could be that this change is only 'generated' because of the way I manually generated the proto changes. It should however not make any difference for this PR once the actual proto change has been merged.
There was a problem hiding this comment.
It seems that the generated code change is on master so I think you should be able to revert this file.
Done. |
|
Thanks for the changes. One more request @olavloite, would you be able to upload any samples you have? I'm not sure whether it should be in this PR or in a separate one but I'll let you decide. |
I've added the samples to this PR. |
skuruppu
left a comment
There was a problem hiding this comment.
Thanks @olavloite. Please merge in the change after you've resolved the merge conflicts.
1ff18c7 to
220d238
Compare
Adds the ability to set
QueryOptionswhen running Cloud Spanner queries. For now, only setting thequery_optimizer_versionis added.QueryOptions can be configured through the following mechanisms:
SPANNER_OPTIMIZER_VERSIONenvironment variable.Databaselevel usingspanner.instance('instance-name').database('database-name', sessionPoolOptions, queryOptions).ExecuteSqlRequest.queryOptions.If the options are configured through multiple mechanisms then:
Databaselevel.Databaseor environment variable level.If no options are set, the optimizer version will default to: