Class Case
- java.lang.Object
-
- com.couchbase.client.java.query.dsl.functions.Case
-
@Experimental @Public public class Case extends Object
DSL for creating CASE...END constructs.- Since:
- 2.2
- Author:
- Simon Baslé
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Case.CaseClause
static interface
Case.ThenClause
static interface
Case.WhenClause
-
Constructor Summary
Constructors Constructor Description Case()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Case.WhenClause
caseSearch()
Constructs a "search case" expression.static Case.WhenClause
caseSimple(Expression expected)
Constructs a "simple case" expression.
-
-
-
Method Detail
-
caseSimple
public static Case.WhenClause caseSimple(Expression expected)
Constructs a "simple case" expression. Initial caseExpression will be compared to each WHEN clause for equality, and if it matches the corresponding THEN expression will be returned. If no WHEN-THEN matches, the ELSE expression is returned. If no ELSE was provided, NULL is returned.- Parameters:
expected
- the initial caseExpression on which to match.
-
caseSearch
public static Case.WhenClause caseSearch()
Constructs a "search case" expression. Each WHEN clause will have its condition inspected in turn, and if it holds true the corresponding THEN expression will be returned. If no WHEN-THEN matches, the ELSE expression is returned. If no ELSE was provided, NULL is returned.
-
-