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 that? The documentation seems inconsistent here. The documentation about sqlite3_column_*: > If a memory allocation error occurs during the evaluation of any of these routines, a default value is returned. The default value is either the integer 0, the floating point number 0.0, or a NULL pointer. Subsequent calls to sqlite3_errcode() will return SQLITE_NOMEM. The documentation about sqlite3_errcode(): > If the most recent sqlite3_* API call associated with database connection D failed, then the sqlite3_errcode(D) interface returns the numeric result code or extended result code for that API call. If the most recent API call was successful, then the return value from sqlite3_errcode() is undefined. The sqlite3_extended_errcode() interface is the same except that it always returns the extended result code even when extended result codes are disabled. 1. How can I check the error code if I'm unsure if the column function was successful or not? If it was successful, then the error code is undefined. 2. Is SQLITE_NOMEM the only error code possible for the sqlite3_column_* functions? 3. Is it possible for every single one of the sqlite3_column_* functions to fail in this manner? Thanks, Brian Vincent _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users