Skip to content

Commit

Permalink
feat: Adding new fields for Serverless analytics (#906)
Browse files Browse the repository at this point in the history
* feat: Adding new fields for Serverless analytics

PiperOrigin-RevId: 513499163

Source-Link: googleapis/googleapis@c3ffffa

Source-Link: googleapis/googleapis-gen@3e262dc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2UyNjJkYzg2YTllNzNlYTBiNmNmZDdkMTlhYzc2ODVhYzM0YTBlNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 2, 2023
1 parent 777229d commit 2a5a636
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
24 changes: 24 additions & 0 deletions google/cloud/spanner_v1/types/spanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ class ExecuteSqlRequest(proto.Message):
given query.
request_options (google.cloud.spanner_v1.types.RequestOptions):
Common options for this request.
data_boost_enabled (bool):
If this is for a partitioned read and this field is set to
``true``, the request will be executed via Spanner
independent compute resources.
If the field is set to ``true`` but the request does not set
``partition_token``, the API will return an
``INVALID_ARGUMENT`` error.
"""

class QueryMode(proto.Enum):
Expand Down Expand Up @@ -615,6 +623,10 @@ class QueryOptions(proto.Message):
number=11,
message="RequestOptions",
)
data_boost_enabled: bool = proto.Field(
proto.BOOL,
number=15,
)


class ExecuteBatchDmlRequest(proto.Message):
Expand Down Expand Up @@ -1125,6 +1137,14 @@ class ReadRequest(proto.Message):
create this partition_token.
request_options (google.cloud.spanner_v1.types.RequestOptions):
Common options for this request.
data_boost_enabled (bool):
If this is for a partitioned query and this field is set to
``true``, the request will be executed via Spanner
independent compute resources.
If the field is set to ``true`` but the request does not set
``partition_token``, the API will return an
``INVALID_ARGUMENT`` error.
"""

session: str = proto.Field(
Expand Down Expand Up @@ -1170,6 +1190,10 @@ class ReadRequest(proto.Message):
number=11,
message="RequestOptions",
)
data_boost_enabled: bool = proto.Field(
proto.BOOL,
number=16,
)


class BeginTransactionRequest(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-spanner-admin-database",
"version": "3.28.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-spanner-admin-instance",
"version": "3.28.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-spanner",
"version": "3.28.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
8 changes: 4 additions & 4 deletions scripts/fixup_spanner_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ class spannerCallTransformer(cst.CSTTransformer):
'create_session': ('database', 'session', ),
'delete_session': ('name', ),
'execute_batch_dml': ('session', 'transaction', 'statements', 'seqno', 'request_options', ),
'execute_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', ),
'execute_streaming_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', ),
'execute_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', 'data_boost_enabled', ),
'execute_streaming_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', 'data_boost_enabled', ),
'get_session': ('name', ),
'list_sessions': ('database', 'page_size', 'page_token', 'filter', ),
'partition_query': ('session', 'sql', 'transaction', 'params', 'param_types', 'partition_options', ),
'partition_read': ('session', 'table', 'key_set', 'transaction', 'index', 'columns', 'partition_options', ),
'read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', ),
'read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', 'data_boost_enabled', ),
'rollback': ('session', 'transaction_id', ),
'streaming_read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', ),
'streaming_read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', 'data_boost_enabled', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand Down

0 comments on commit 2a5a636

Please sign in to comment.