Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
feat: add context manager support in client (#328)
- [ ] Regenerate this pull request now. chore: fix docstring for first attribute of protos committer: @busunkim96 PiperOrigin-RevId: 401271153 Source-Link: googleapis/googleapis@787f8c9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/81decffe9fc72396a8153e756d1d67a6eecfd620 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODFkZWNmZmU5ZmM3MjM5NmE4MTUzZTc1NmQxZDY3YTZlZWNmZDYyMCJ9
- Loading branch information
Showing
with
391 additions
and 16 deletions.
- +6 −0 google/cloud/bigquery_storage_v1/services/big_query_read/async_client.py
- +14 −4 google/cloud/bigquery_storage_v1/services/big_query_read/client.py
- +9 −0 google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py
- +3 −0 google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py
- +3 −0 google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py
- +6 −0 google/cloud/bigquery_storage_v1/services/big_query_write/async_client.py
- +14 −4 google/cloud/bigquery_storage_v1/services/big_query_write/client.py
- +9 −0 google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py
- +3 −0 google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py
- +3 −0 google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py
- +2 −0 google/cloud/bigquery_storage_v1/types/avro.py
- +1 −0 google/cloud/bigquery_storage_v1/types/protobuf.py
- +17 −0 google/cloud/bigquery_storage_v1/types/storage.py
- +3 −0 google/cloud/bigquery_storage_v1/types/stream.py
- +1 −0 google/cloud/bigquery_storage_v1/types/table.py
- +6 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py
- +14 −4 google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py
- +9 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py
- +3 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py
- +3 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py
- +6 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py
- +14 −4 google/cloud/bigquery_storage_v1beta2/services/big_query_write/client.py
- +9 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py
- +3 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py
- +3 −0 google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py
- +2 −0 google/cloud/bigquery_storage_v1beta2/types/avro.py
- +1 −0 google/cloud/bigquery_storage_v1beta2/types/protobuf.py
- +19 −0 google/cloud/bigquery_storage_v1beta2/types/storage.py
- +3 −0 google/cloud/bigquery_storage_v1beta2/types/stream.py
- +2 −0 google/cloud/bigquery_storage_v1beta2/types/table.py
- +50 −0 tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py
- +50 −0 tests/unit/gapic/bigquery_storage_v1/test_big_query_write.py
- +50 −0 tests/unit/gapic/bigquery_storage_v1beta2/test_big_query_read.py
- +50 −0 tests/unit/gapic/bigquery_storage_v1beta2/test_big_query_write.py
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -346,5 +346,8 @@ def split_read_stream( | ||
) | ||
return self._stubs["split_read_stream"] | ||
|
||
def close(self): | ||
self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("BigQueryReadGrpcTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -351,5 +351,8 @@ def split_read_stream( | ||
) | ||
return self._stubs["split_read_stream"] | ||
|
||
def close(self): | ||
return self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("BigQueryReadGrpcAsyncIOTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -444,5 +444,8 @@ def flush_rows( | ||
) | ||
return self._stubs["flush_rows"] | ||
|
||
def close(self): | ||
self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("BigQueryWriteGrpcTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -448,5 +448,8 @@ def flush_rows( | ||
) | ||
return self._stubs["flush_rows"] | ||
|
||
def close(self): | ||
return self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("BigQueryWriteGrpcAsyncIOTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -49,6 +49,7 @@ class ProtoSchema(proto.Message): | ||
|
||
class ProtoRows(proto.Message): | ||
r""" | ||
Attributes: | ||
serialized_rows (Sequence[bytes]): | ||
A sequence of rows serialized as a Protocol | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -24,6 +24,7 @@ | ||
|
||
class TableSchema(proto.Message): | ||
r"""Schema of a table. | ||
Attributes: | ||
fields (Sequence[google.cloud.bigquery_storage_v1.types.TableFieldSchema]): | ||
Describes the fields in a table. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.