Eduard Rakhmankulov created IGNITE-28393:
--------------------------------------------
Summary: C++ 3.0: improve SQL result_set API
Key: IGNITE-28393
URL: https://issues.apache.org/jira/browse/IGNITE-28393
Project: Ignite
Issue Type: Improvement
Components: thin clients ai3
Reporter: Eduard Rakhmankulov
Currently available API when user utilize SQL query needs of improvement.
* API seems inconsistent: impossible to iterate over query result within one
loop, either branches or additional code required:
{code:java}
//working example
auto rs = m_client.get_sql().execute(nullptr, nullptr, {sql.str()}, {});
do {
auto page = rs.current_page();
for (auto &rec : page) {
///
}
if (rs.has_more_pages())
rs.fetch_next_page();
else
break;
} while (true);// if check here then we lost last {code}
considerations: one approach to make ::current_page() unavailable until
::fetch_next_page() is called (BREAKING CHANGES).
Also we should introduce non-page API using standard iterators and for_each.
For that implementing std::begin and std::end is required.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)