Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-13 Thread Hick Gunter
xRowid() is only called if the (hidden field) rowid is explicitly mentioned in the select list, join condition or where clause(s) of a SELECT statement; or if your VTAB supports write operations (see xUpdate documentation http://www.sqlite.org/vtab.html#the_xupdate_method ). -Ursprüngliche

Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-13 Thread Hick Gunter
>On 12/13/2016 01:47 AM, Bob Friesenhahn wrote: >> I am reworking code for a virtual table module and need to provide >> proper error codes from the xColumn() and xRowid() callbacks for the >> case where the row id does not exist, or the current row goes away. >> This problem occurs because the

Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-13 Thread Hick Gunter
Current documentation http://www.sqlite.org/rescode.html suggests you return (267) SQLITE_CORRUPT_VTAB in this case. Other candidates would be SQLITE_IOERR or SQLITE_NOTFOUND. You may also call one or more of the sqlite_result_error() functions to set an error string and/or an error code;

Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-12 Thread Bob Friesenhahn
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

Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-12 Thread Dan Kennedy
On 12/13/2016 01:47 AM, Bob Friesenhahn wrote: I am reworking code for a virtual table module and need to provide proper error codes from the xColumn() and xRowid() callbacks for the case where the row id does not exist, or the current row goes away. This problem occurs because the current

[sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-12 Thread Bob Friesenhahn
I am reworking code for a virtual table module and need to provide proper error codes from the xColumn() and xRowid() callbacks for the case where the row id does not exist, or the current row goes away. This problem occurs because the current virtual table module implementation does not lock