1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00

Provide a two-argument version of the iif() function, plus an alternative

spelling that only requires a single "i".

FossilOrigin-Name: a251ee645e11e24b67473d8a5bd3f8b72fde1ac9d5fda074f5da2297deb2faa8
This commit is contained in:
drh
2024-11-26 20:56:03 +00:00
parent 3e4ccc3208
commit f12e5d1a0f
4 changed files with 27 additions and 13 deletions

View File

@@ -2814,7 +2814,10 @@ void sqlite3RegisterBuiltinFunctions(void){
#endif /* SQLITE_ENABLE_MATH_FUNCTIONS */
FUNCTION(sign, 1, 0, 0, signFunc ),
INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, 0 ),
INLINE_FUNC(iif, 2, INLINEFUNC_iif, 0 ),
INLINE_FUNC(iif, 3, INLINEFUNC_iif, 0 ),
INLINE_FUNC(if, 2, INLINEFUNC_iif, 0 ),
INLINE_FUNC(if, 3, INLINEFUNC_iif, 0 ),
};
#ifndef SQLITE_OMIT_ALTERTABLE
sqlite3AlterFunctions();