Skip to content

Commit

Permalink
cql3: drop unused function
Browse files Browse the repository at this point in the history
there are two variants of `query_processor::for_each_cql_result()`,
both of them perform the pagination of results returned by a CQL
statement. the one which accepts a function returning an instant
value is not used now. so let's drop it.

Signed-off-by: Kefu Chai <[email protected]>

Closes scylladb#13675
  • Loading branch information
tchaikov authored and denesb committed Apr 26, 2023
1 parent a29b8cd commit c8aa729
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
16 changes: 0 additions & 16 deletions cql3/query_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -729,22 +729,6 @@ bool query_processor::has_more_results(::shared_ptr<cql3::internal_query_state>
return false;
}

future<> query_processor::for_each_cql_result(
::shared_ptr<cql3::internal_query_state> state,
std::function<stop_iteration(const cql3::untyped_result_set::row&)>&& f) {
do {
auto msg = co_await execute_paged_internal(state);
if (msg->empty()) {
co_return;
}
for (auto& row : *msg) {
if (f(row) == stop_iteration::yes) {
co_return;
}
}
} while (has_more_results(state));
}

future<> query_processor::for_each_cql_result(
::shared_ptr<cql3::internal_query_state> state,
noncopyable_function<future<stop_iteration>(const cql3::untyped_result_set::row&)>&& f) {
Expand Down
7 changes: 0 additions & 7 deletions cql3/query_processor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,6 @@ private:
*/
future<::shared_ptr<untyped_result_set>> execute_paged_internal(::shared_ptr<internal_query_state> state);

/*!
* \brief iterate over all results using paging
*/
future<> for_each_cql_result(
::shared_ptr<cql3::internal_query_state> state,
std::function<stop_iteration(const cql3::untyped_result_set_row&)>&& f);

/*!
* \brief iterate over all results using paging, accept a function that returns a future
*/
Expand Down

0 comments on commit c8aa729

Please sign in to comment.