~singpolyma/biboumi

cdace80758e2ee41f33824ad7f52a369c42a4a89 — louiz’ 4 years ago faa33c1
Check that db.prepare worked before using the returned statement
1 files changed, 2 insertions(+), 0 deletions(-)

M src/database/select_query.hpp
M src/database/select_query.hpp => src/database/select_query.hpp +2 -0
@@ 115,6 115,8 @@ struct SelectQuery: public Query
#endif

      auto statement = db.prepare(this->body);
      if (!statement)
        return rows;
      statement->bind(std::move(this->params));

      while (statement->step() == StepResult::Row)