Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Clemens Ladisch
Keith Medcalf wrote: > In the case of a BLOB if a NULL pointer is returned the error code must > be retrieved and then if and only if the bytes counter is greater than > 0 is the error valid. > > Does this mean that if you are retrieving the value of a blob via the > colmn_blob interface you should

[sqlite] Is there permanent link to the latest SQLite amalgamation source?

2018-09-04 Thread John Found
In order to write an autoupdater, I need to download the latest SQLite amalgamation. Is there a permanent link to the subject, or the only way is to parse the download page for links to "sqlite-amalgamation-*.zip" or to build it from the fossil checkout? -- John Found _

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread J Decker
On Tue, Sep 4, 2018 at 2:11 PM Keith Medcalf wrote: > > On Tuesday, 4 September, 2018 14:00, Clemens Ladisch > wrote: > > >Keith Medcalf wrote: > >> 6) If the column type is SQLITE_BLOB > >> a) Retrieve the column value pointer using column_blob > >> b) If the returned pointer is NULL

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Keith Medcalf
On Tuesday, 4 September, 2018 14:00, Clemens Ladisch wrote: >Keith Medcalf wrote: >> 6) If the column type is SQLITE_BLOB >> a) Retrieve the column value pointer using column_blob >> b) If the returned pointer is NULL, then an error has occurred >"The return value from sqlite3_column

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Clemens Ladisch
Keith Medcalf wrote: > 6) If the column type is SQLITE_BLOB > a) Retrieve the column value pointer using column_blob > b) If the returned pointer is NULL, then an error has occurred "The return value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer." Regards, Cleme

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Keith Medcalf
Well, that is not exactly true. If you attempt to retrieve the column values properly, either no errors can occur or if they do, they are obvious. 1) Query the column_type 2) If the column_type is SQLITE_NULL then return a NULL indicator and stop processing these steps. 3) If the column_typ

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Simon Slavin
Your question has been asked earlier this year, and no solution was posted. I'm interested to find out whether things have improved. To summarise the earlier post: 1) sqlite3_column_int() returns the value stored in that column, or 0 if an error occurred.

[sqlite] sqlite3_column_* with error handling

2018-09-04 Thread Brian Vincent
Hi, I'm currently writing a Go sqlite package, go-sqlite-lite. I think it provides a good "pure" SQLite experience with Go. If I want to make sure that the sqlite3_column_* functions never provide a false answer due to an error condition, like a memolry allocation error, how should I go about tha

Re: [sqlite] Latest Pre-Compiled Android Binaries

2018-09-04 Thread Dan Kennedy
On 09/04/2018 03:21 AM, David White wrote: Hello and thanks for any help with this. I have been using the pre-compiled Android binaries on the download page for some time. Recently one of my apps had a "missing class" problem and I thought it might be due to the Sqlite libraries I had been using