Does the SQLite C/C++ API support a way to define a constant for usage in queries? Something like this:
SELECT user_defined_function(USER_DEFINED_CONSTANT)
where USER_DEFINED_CONSTANT
evaluates to some specified value.
Does the SQLite C/C++ API support a way to define a constant for usage in queries? Something like this:
SELECT user_defined_function(USER_DEFINED_CONSTANT)
where USER_DEFINED_CONSTANT
evaluates to some specified value.
You can create a user-defined function that always returns the same value. Alternatively, since you're talking about the C API, you could consider using a variable or a constant at the C level to help create the text of your prepared statements (containing a bona fide SQL literal).
As far as I know or can determine, however, you cannot define a symbol that SQLite will automatically transform to a constant.