On Tue, 13 Dec 2016, Dan Kennedy wrote:
Perhaps SQLITE_NOTFOUND is a correct return code, but the documentation
does not address return codes from virtual table modules.
What is the correct code to return? If a cursor is being navigated, then I
would prefer that the cursor continue to the next result row.
If you want the query to continue, the virtual table methods must return
SQLITE_OK. Anything else will cause SQLite to abandon the query and return
the error to the user. Have the xColumn() method return NULL in this case I
guess.
Ok, thanks.
Or you could load all the column values into memory when your virtual table
cursor visits each row of the underlying data. Then you wouldn't have to
handle the current row disappearing on you.
We are normally doing column caching as you describe. Even without
the caching I can lock for column access at the row level. The case
where the row might no longer exist is for xRowid(), but this function
does not seem to be called for the table I am looking at.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users