
On Thu, Sep 11, 2025 at 9:22 PM Mohammad Nejati <ashtumashtum@gmail.com> wrote:
On Thu, Sep 11, 2025 at 2:25 PM Klemens Morgenstern via Boost <boost@lists.boost.org> wrote:
auto q = conn.prepare("select 42"); for (auto res : sqlite::statement_range<std::tuple<int>>(q));
Would it be possible to have begin() and end() on the statement by default? That way, the following would work: for (auto row : conn.query("select * from ..."));
Of course it would be, but now it might not be obvious that iterating actually modifies the statement. In the old API the .execute() communicated that, because you were iterating a resultset. Well, not clearly enough, but that was the idea.
Also, I see that the connection::query has been removed. What was the reason for that?
It doesn't query, it just creates a prepared statement. So it's just `prepare` everywhere now, because it's sqlite_prepare_v2 under the hood.