@@ -53,51 +53,56 @@ RowStream Client::Read(std::string table, KeySet keys,
5353 std::vector<std::string> columns, Options opts) {
5454 opts = internal::MergeOptions (std::move (opts), opts_);
5555 auto directed_read_option = ExtractOpt<DirectedReadOption>(opts);
56+ auto order_by = ExtractOpt<OrderByOption>(opts);
5657 auto lock_hint = ExtractOpt<LockHintOption>(opts);
5758 internal::OptionsSpan span (std::move (opts));
5859 return conn_->Read ({spanner_internal::MakeSingleUseTransaction (
5960 Transaction::ReadOnlyOptions ()),
6061 std::move (table), std::move (keys), std::move (columns),
6162 ToReadOptions (internal::CurrentOptions ()), absl::nullopt ,
6263 false , std::move (directed_read_option),
63- std::move (lock_hint)});
64+ std::move (order_by), std::move ( lock_hint)});
6465}
6566
6667RowStream Client::Read (Transaction::SingleUseOptions transaction_options,
6768 std::string table, KeySet keys,
6869 std::vector<std::string> columns, Options opts) {
6970 opts = internal::MergeOptions (std::move (opts), opts_);
7071 auto directed_read_option = ExtractOpt<DirectedReadOption>(opts);
72+ auto order_by = ExtractOpt<OrderByOption>(opts);
7173 auto lock_hint = ExtractOpt<LockHintOption>(opts);
7274 internal::OptionsSpan span (std::move (opts));
7375 return conn_->Read ({spanner_internal::MakeSingleUseTransaction (
7476 std::move (transaction_options)),
7577 std::move (table), std::move (keys), std::move (columns),
7678 ToReadOptions (internal::CurrentOptions ()), absl::nullopt ,
7779 false , std::move (directed_read_option),
78- std::move (lock_hint)});
80+ std::move (order_by), std::move ( lock_hint)});
7981}
8082
8183RowStream Client::Read (Transaction transaction, std::string table, KeySet keys,
8284 std::vector<std::string> columns, Options opts) {
8385 opts = internal::MergeOptions (std::move (opts), opts_);
8486 auto directed_read_option = ExtractOpt<DirectedReadOption>(opts);
87+ auto order_by = ExtractOpt<OrderByOption>(opts);
8588 auto lock_hint = ExtractOpt<LockHintOption>(opts);
8689 internal::OptionsSpan span (std::move (opts));
8790 return conn_->Read ({std::move (transaction), std::move (table), std::move (keys),
8891 std::move (columns),
8992 ToReadOptions (internal::CurrentOptions ()), absl::nullopt ,
9093 false , std::move (directed_read_option),
91- std::move (lock_hint)});
94+ std::move (order_by), std::move ( lock_hint)});
9295}
9396
9497RowStream Client::Read (ReadPartition const & read_partition, Options opts) {
9598 opts = internal::MergeOptions (std::move (opts), opts_);
9699 auto directed_read_option = ExtractOpt<DirectedReadOption>(opts);
100+ auto order_by = ExtractOpt<OrderByOption>(opts);
97101 auto lock_hint = ExtractOpt<LockHintOption>(opts);
98102 internal::OptionsSpan span (std::move (opts));
99103 return conn_->Read (spanner_internal::MakeReadParams (
100- read_partition, std::move (directed_read_option), std::move (lock_hint)));
104+ read_partition, std::move (directed_read_option), std::move (order_by),
105+ std::move (lock_hint)));
101106}
102107
103108StatusOr<std::vector<ReadPartition>> Client::PartitionRead (
@@ -108,7 +113,7 @@ StatusOr<std::vector<ReadPartition>> Client::PartitionRead(
108113 {{std::move (transaction), std::move (table), std::move (keys),
109114 std::move (columns), ToReadOptions (internal::CurrentOptions ()),
110115 absl::nullopt , false , DirectedReadOption::Type{},
111- LockHint::kLockHintUnspecified },
116+ OrderBy:: kOrderByUnspecified , LockHint::kLockHintUnspecified },
112117 ToPartitionOptions (internal::CurrentOptions ())});
113118}
114119
0 commit comments