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 class to mock [`google::cloud::bigtable::DataConnection`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1DataConnection).
Application developers may want to test their code with simulated responses, including errors from a [`bigtable::Table`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1Table). To do so, construct a [`bigtable::Table`](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1Table) with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See [Mocking the Cloud Bigtable C++ Client with Google Mock](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/bigtable-mocking) for a complete example that mocks `Table` calls.

## Constructors

### MockDataConnection()

## Functions

### virtual options()

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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.
This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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 \>)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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 \>)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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 \&)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

| **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 \&)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

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

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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

### virtual ExecuteQuery(bigtable::ExecuteQueryParams)

This function is implemented using [gMock](https://google.github.io/googletest)'s `MOCK_METHOD()`.
Consult the gMock documentation to use this mock in your tests.

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

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