I'm using SQLite with C API.
On C API, I can check the result value of a column with sqlite3_column_*
functions. the problem is there is no function for the case of the value is NULL
. Of course, I can check the value with sqlite3_column_bytes
function, but it can cause conversion, and I want to avoid conversion at all.
How can I check the value at a column of a row is NULL or not?
From what I can remember (and tell from the documentation), the correct way to do it is to use sqlite3_column_type()
to check for SQLITE_NULL
.
Just be sure to do it before doing anything that may cause conversion of the column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With