TableService provides methods for managing BigQuery tables and table-like entities such as views and snapshots.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
TableServiceClient(TableServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
TableServiceClient const &
|
TableServiceClient(TableServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
TableServiceClient &&
|
TableServiceClient(std::shared_ptr< TableServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< TableServiceConnection >
|
opts |
Options
|
Operators
operator=(TableServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
TableServiceClient const &
|
Returns | |
---|---|
Type | Description |
TableServiceClient & |
operator=(TableServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
TableServiceClient &&
|
Returns | |
---|---|
Type | Description |
TableServiceClient & |
Functions
GetTable(google::cloud::bigquery::v2::GetTableRequest const &, Options)
Gets the specified table resource by table ID.
This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::GetTableRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::v2::Table > |
the result of the RPC. The response message type (google.cloud.bigquery.v2.Table) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
InsertTable(google::cloud::bigquery::v2::InsertTableRequest const &, Options)
Creates a new, empty table in the dataset.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::InsertTableRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::v2::Table > |
the result of the RPC. The response message type (google.cloud.bigquery.v2.Table) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
PatchTable(google::cloud::bigquery::v2::UpdateOrPatchTableRequest const &, Options)
Updates information in an existing table.
The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports RFC5789 patch semantics.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::UpdateOrPatchTableRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::v2::Table > |
the result of the RPC. The response message type (google.cloud.bigquery.v2.Table) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateTable(google::cloud::bigquery::v2::UpdateOrPatchTableRequest const &, Options)
Updates information in an existing table.
The update method replaces the entire Table resource, whereas the patch method only replaces fields that are provided in the submitted Table resource.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::UpdateOrPatchTableRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::v2::Table > |
the result of the RPC. The response message type (google.cloud.bigquery.v2.Table) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteTable(google::cloud::bigquery::v2::DeleteTableRequest const &, Options)
Deletes the table specified by tableId from the dataset.
If the table contains data, all the data will be deleted.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::DeleteTableRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
ListTables(google::cloud::bigquery::v2::ListTablesRequest, Options)
Lists all tables in the specified dataset.
Requires the READER dataset role.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::v2::ListTablesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::v2::ListFormatTable > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |