Skip to content

Commit

Permalink
Support result set extract from TDataQueryResult (ydb-platform#1388)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkadyRudenko authored Jan 29, 2024
1 parent 6aac9f0 commit 8a154cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ydb/public/sdk/cpp/client/ydb_table/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,10 @@ const TVector<TResultSet>& TDataQueryResult::GetResultSets() const {
return ResultSets_;
}

TVector<TResultSet> TDataQueryResult::ExtractResultSets() && {
return std::move(ResultSets_);
}

TResultSet TDataQueryResult::GetResultSet(size_t resultIndex) const {
if (resultIndex >= ResultSets_.size()) {
RaiseError(TString("Requested index out of range\n"));
Expand Down
1 change: 1 addition & 0 deletions ydb/public/sdk/cpp/client/ydb_table/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,7 @@ class TDataQueryResult : public TStatus {
const TMaybe<TDataQuery>& dataQuery, bool fromCache, const TMaybe<TQueryStats>& queryStats);

const TVector<TResultSet>& GetResultSets() const;
TVector<TResultSet> ExtractResultSets() &&;
TResultSet GetResultSet(size_t resultIndex) const;

TResultSetParser GetResultSetParser(size_t resultIndex) const;
Expand Down

0 comments on commit 8a154cb

Please sign in to comment.