Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions doc/v3-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,64 @@ module which can be added to your `MODULE.bazel` file as a dependency.

### Bigtable

<details>
<summary>Removed <code>bigtable::RowReader</code> constructors
</summary>

The `bigtable::RowReader` constructors that accept `DataClient` as an argument
have been removed.

Developers that read rows by directly constructing a `RowReader` object should
instead construct a `Table` object and call `Table::ReadRows(...)`.

For example, code that used to look like this:

**Before:**

```cpp
#include "google/cloud/bigtable/data_client.h"
#include "google/cloud/bigtable/row_reader.h"
#include "google/cloud/bigtable/table.h"

// ...

auto client = google::cloud::bigtable::MakeDataClient(
"my-project", "my-instance", creds);
auto reader = google::cloud::bigtable::RowReader(
client, "my-table-id", google::cloud::bigtable::RowSet("r1", "r2"),
google::cloud::bigtable::RowReader::NO_ROWS_LIMIT,
google::cloud::bigtable::Filter::PassAllFilter(),
/*...retry and backoff policies...*/);

for (auto& row : reader) {
if (!row) throw std::move(row).status();
// ...
}
```

Should be changed to this:

**After:**

```cpp
#include "google/cloud/bigtable/table.h"

// ...

namespace cbt = google::cloud::bigtable;
cbt::Table table(cbt::MakeDataConnection(),
cbt::TableResource("my-project", "my-instance", "my-table-id"));

for (auto& row : table.ReadRows(
cbt::RowSet("r1", "r2"),
cbt::Filter::PassAllFilter())) {
if (!row) throw std::move(row).status();
// ...
}
```

</details>

### Pubsub

### Spanner
Expand Down
26 changes: 0 additions & 26 deletions google/cloud/bigtable/row_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,6 @@ RowReader::RowReader()
: RowReader(
std::make_shared<bigtable_internal::StatusOnlyRowReader>(Status{})) {}

RowReader::RowReader(
std::shared_ptr<DataClient> client, std::string table_name, RowSet row_set,
std::int64_t rows_limit, Filter filter,
std::unique_ptr<RPCRetryPolicy> retry_policy,
std::unique_ptr<RPCBackoffPolicy> backoff_policy,
MetadataUpdatePolicy metadata_update_policy,
std::unique_ptr<internal::ReadRowsParserFactory> parser_factory)
: RowReader(std::make_shared<bigtable_internal::LegacyRowReader>(
std::move(client), std::move(table_name), std::move(row_set),
rows_limit, std::move(filter), std::move(retry_policy),
std::move(backoff_policy), std::move(metadata_update_policy),
std::move(parser_factory))) {}

RowReader::RowReader(
std::shared_ptr<DataClient> client, std::string app_profile_id,
std::string table_name, RowSet row_set, std::int64_t rows_limit,
Filter filter, std::unique_ptr<RPCRetryPolicy> retry_policy,
std::unique_ptr<RPCBackoffPolicy> backoff_policy,
MetadataUpdatePolicy metadata_update_policy,
std::unique_ptr<internal::ReadRowsParserFactory> parser_factory)
: RowReader(std::make_shared<bigtable_internal::LegacyRowReader>(
std::move(client), std::move(app_profile_id), std::move(table_name),
std::move(row_set), rows_limit, std::move(filter),
std::move(retry_policy), std::move(backoff_policy),
std::move(metadata_update_policy), std::move(parser_factory))) {}

std::int64_t constexpr RowReader::NO_ROWS_LIMIT;

// The name must be all lowercase to work with range-for loops.
Expand Down
16 changes: 0 additions & 16 deletions google/cloud/bigtable/row_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,6 @@ class RowReader {
/// Default constructs an empty RowReader.
RowReader();

GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED()
RowReader(std::shared_ptr<DataClient> client, std::string table_name,
RowSet row_set, std::int64_t rows_limit, Filter filter,
std::unique_ptr<RPCRetryPolicy> retry_policy,
std::unique_ptr<RPCBackoffPolicy> backoff_policy,
MetadataUpdatePolicy metadata_update_policy,
std::unique_ptr<internal::ReadRowsParserFactory> parser_factory);

GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED()
RowReader(std::shared_ptr<DataClient> client, std::string app_profile_id,
std::string table_name, RowSet row_set, std::int64_t rows_limit,
Filter filter, std::unique_ptr<RPCRetryPolicy> retry_policy,
std::unique_ptr<RPCBackoffPolicy> backoff_policy,
MetadataUpdatePolicy metadata_update_policy,
std::unique_ptr<internal::ReadRowsParserFactory> parser_factory);

// NOLINTNEXTLINE(performance-noexcept-move-constructor)
RowReader(RowReader&&) = default;

Expand Down