SQLite and user-defined functions

What values ​​can a custom SQLite3 function return?

A relevant example is adding a function for regexp- what values ​​will it return to indicate a match or a mismatch? Or should it be invalid?

+3
source share
2 answers

Results are displayed from SQLite3 functions (at C level ) using the function sqlite3_result_int(and its siblings if other types are returned).

void sqlite3_result_int(sqlite3_context*, int);

Report an error with 0 for the second argument and true with 1 (or another non-zero).

+2
source

( SQLite), SQLite3, , MATCH.

, REGEXP

0

All Articles