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

testExpr gda.types.SqlBuilderId

the expression ID representing the test of the CASE, or 0

elseExpr gda.types.SqlBuilderId

the expression ID representing the ELSE expression, or 0

whenArray gda.types.SqlBuilderId[]

an array containing each WHEN expression ID, having at least args_size elements

thenArray gda.types.SqlBuilderId[]

an array containing each THEN expression ID, having at least args_size elements

Return Value

Type: gda.types.SqlBuilderId

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