Case.ThenClause when(Expression conditionOrExpression)
WHEN clause, to be followed by its
If the CASE is a “search case”, the given
Expression must be a condition. Otherwise, in a “simple case”, the given Expression is matched against the initial case Expression for equality.
If the condition holds true, the CASE will return the expression given by the following THEN clause. Otherwise next WHEN clause is evaluated, if none left the ELSE clause is used, if none the CASE returns NULL.
Copyright © 2015 Couchbase, Inc.