Wouldn't the addition of "Empty result sets will return SQLITE_DONE on the first call to sqlite3_step." add some clarity?
Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate ________________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Igor Tandetnik [itandet...@mvps.org] Sent: Sunday, March 27, 2011 8:11 PM To: sqlite-users@sqlite.org Subject: EXT :Re: [sqlite] sqlite3_step behavior on empty set Sam Carleton <scarle...@miltonstreet.com> wrote: > Is my impression correct that when calling sqlite3_step() on a query > that returns no rows, the result will be [SQLITE_DONE]? Yes. > If that is the case, might that be added to the documentation? "SQLITE_DONE means that the statement has finished executing successfully." "If the SQL statement being executed returns any data, then SQLITE_ROW is returned each time a new row of data is ready for processing by the caller." The implication is that if SQL statement doesn't return any data, then sqlite3_step doesn't return SQLITE_ROW. Since it nevertheless finishes executing successfully, it returns SQLITE_DONE. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users