SqlBuilder.addCase

Creates a new CASE ... WHEN ... THEN ... ELSE ... END expression. The WHEN expression and the THEN expression IDs are taken from the when_array and then_array at the same index, for each index inferior to args_size.

Parameters

testExprthe expression ID representing the test of the CASE, or 0
elseExprthe expression ID representing the ELSE expression, or 0
whenArrayan array containing each WHEN expression ID, having at least args_size elements
thenArrayan array containing each THEN expression ID, having at least args_size elements

Returns

the ID of the new expression, or 0 if there was an error