3.8.0-rc 3.7.0 (latest) 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 2.48.0-rc 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.0 2.22.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 2.14.0 2.13.0 2.12.0 2.11.0 A connection to the Cloud Bigtable Data API.
This interface defines pure-virtual methods for each of the user-facing overload sets in [`Table`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1Table). This allows users to inject custom behavior (e.g., with a Google Mock object) in a [`Table`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1Table) object for use in their own tests.

To create a concrete instance, see [`MakeDataConnection()`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/namespacegoogle_1_1cloud_1_1bigtable).

For mocking, see [`bigtable_mocks::MockDataConnection`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable__mocks_1_1MockDataConnection).

###### Connection Pool

This class opens a number of [gRPC Channels](https://grpc.io/docs/what-is-grpc/core-concepts/#channels) upon its construction. These channels each initiate a connection to the Cloud Bigtable service. This is a relatively slow operation that can take milliseconds, so applications are advised to reuse [`DataConnection`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1DataConnection) objects when possible.
The exact number of channels can be configured with the [`google::cloud::GrpcNumChannelsOption`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1GrpcNumChannelsOption.html). If this option is not set, the class creates between 1 and 64 channels. The specific algorithm and number of channels is an implementation detail, and subject to change without notice.

Each request sent from the client library cycles through the channels in the connection pool in a round robin fashion.

Unused gRPC channels can enter an idle state. Refreshing them during a request may incur additional latency. To avoid this, the client library keeps connections open by refreshing the channels in a background thread. Advanced users can configure the frequency of the refreshes, or disable this feature, by using [`bigtable::MinConnectionRefreshOption`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/structgoogle_1_1cloud_1_1bigtable_1_1MinConnectionRefreshOption) and [`bigtable::MaxConnectionRefreshOption`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/structgoogle_1_1cloud_1_1bigtable_1_1MaxConnectionRefreshOption).

## Functions

### virtual options()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Options` |   |

### virtual Apply(std::string const \&, SingleRowMutation)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `mut` | `SingleRowMutation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Status` |   |

### virtual AsyncApply(std::string const \&, SingleRowMutation)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `mut` | `SingleRowMutation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< Status >` |   |

### virtual BulkApply(std::string const \&, BulkMutation)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `mut` | `BulkMutation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::vector< FailedMutation >` |   |

### virtual AsyncBulkApply(std::string const \&, BulkMutation)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `mut` | `BulkMutation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< std::vector< FailedMutation > >` |   |

### virtual ReadRows(std::string const \&, RowSet, std::int64_t, Filter)

Prefer to use [`ReadRowsFull()`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1DataConnection#classgoogle_1_1cloud_1_1bigtable_1_1DataConnection_1a6d020c8d2a384ab2c09ee643aa01900e) in mocks.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `row_set` | `RowSet` |
| `rows_limit` | `std::int64_t` |
| `filter` | `Filter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `RowReader` |   |

### virtual ReadRowsFull(ReadRowsParams)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `params` | `ReadRowsParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `RowReader` |   |

### virtual ReadRow(std::string const \&, std::string, Filter)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `row_key` | `std::string` |
| `filter` | `Filter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< std::pair< bool, Row > >` |   |

### virtual CheckAndMutateRow(std::string const \&, std::string, Filter, std::vector\< Mutation \>, std::vector\< Mutation \>)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `row_key` | `std::string` |
| `filter` | `Filter` |
| `true_mutations` | `std::vector< Mutation >` |
| `false_mutations` | `std::vector< Mutation >` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< MutationBranch >` |   |

### virtual AsyncCheckAndMutateRow(std::string const \&, std::string, Filter, std::vector\< Mutation \>, std::vector\< Mutation \>)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `row_key` | `std::string` |
| `filter` | `Filter` |
| `true_mutations` | `std::vector< Mutation >` |
| `false_mutations` | `std::vector< Mutation >` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< MutationBranch > >` |   |

### virtual SampleRows(std::string const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< std::vector< RowKeySample > >` |   |

### virtual AsyncSampleRows(std::string const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< std::vector< RowKeySample > > >` |   |

### virtual ReadModifyWriteRow(google::bigtable::v2::ReadModifyWriteRowRequest)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::bigtable::v2::ReadModifyWriteRowRequest` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< Row >` |   |

### virtual AsyncReadModifyWriteRow(google::bigtable::v2::ReadModifyWriteRowRequest)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::bigtable::v2::ReadModifyWriteRowRequest` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< Row > >` |   |

### virtual AsyncReadRows(std::string const \&, std::function\< future\< bool \>(Row)\>, std::function\< void(Status)\>, RowSet, std::int64_t, Filter)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `on_row` | `std::function< future< bool >(Row)>` |
| `on_finish` | `std::function< void(Status)>` |
| `row_set` | `RowSet` |
| `rows_limit` | `std::int64_t` |
| `filter` | `Filter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### virtual AsyncReadRow(std::string const \&, std::string, Filter)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `table_name` | `std::string const &` |
| `row_key` | `std::string` |
| `filter` | `Filter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< std::pair< bool, Row > > >` |   |

### virtual PrepareQuery(bigtable::PrepareQueryParams const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `p` | `bigtable::PrepareQueryParams const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< bigtable::PreparedQuery >` |   |

### virtual AsyncPrepareQuery(bigtable::PrepareQueryParams const \&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `p` | `bigtable::PrepareQueryParams const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< bigtable::PreparedQuery > >` |   |

### virtual ExecuteQuery(bigtable::ExecuteQueryParams)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `p` | `bigtable::ExecuteQueryParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bigtable::RowStream` |   |