feat(bigtable): Add PrepareStatement to run GoogleSQL queries#11829
feat(bigtable): Add PrepareStatement to run GoogleSQL queries#11829bhshkh merged 4 commits intogoogleapis:mainfrom
Conversation
| } | ||
|
|
||
| // PrepareOption can be passed while preparing a query statement. | ||
| type PrepareOption interface { |
There was a problem hiding this comment.
What is this empty interface for?
There was a problem hiding this comment.
Go does not allow function overloading.
In the past, whenever we wanted to accept more arguments to functions we had to name new functions
xxxxxxWithOptions(..........., opts )
E.g. GetAll and GetAllWithOptions, Run and RunWithOptions
I have added this empty interface here to allow for future extensions to function PrepareStatement.
What do you think ? Is it better to have PrepareStatement and PrepareStatementWithOptions (if any in the future)
or
PrepareStatement in its current form
There was a problem hiding this comment.
This seems fine. Let's keep it as is.
bigtable/bigtable.go
Outdated
| InstanceName: c.fullInstanceName(), | ||
| AppProfileId: c.appProfile, | ||
| Query: query, | ||
| ParamTypes: reqParamTypes, |
There was a problem hiding this comment.
This should also set data_format to ProtoFormat
|
Hi there, when will this be added on bigtable emulator? I am getting the following error on |
To execute a SQL query, user needs to
The "Prepare" step takes a SQL query text and some additional information and returns some state and an execution plan. Essentially, it processes the query and sets up what is needed to run it, before the actual execution of the query occurs.
This PR adds support for the first step.
More context:
feat(bigtable): Add datatypes for GoogleSQL #11816