@InterfaceStability.Experimental @InterfaceAudience.Public public class Case extends Object
DSL for creating CASE…END constructs.
Modifier and Type | Class and Description |
---|---|
static interface |
Case.CaseClause |
static interface |
Case.ThenClause |
static interface |
Case.WhenClause |
Constructor and Description |
---|
Case() |
Modifier and Type | Method and Description |
---|---|
static Case.WhenClause |
caseSearch()
Constructs a “search case” expression.
|
static Case.WhenClause |
caseSimple(Expression expected)
Constructs a “simple case” expression.
|
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.
expected
- the initial caseExpression on which to match.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.
Copyright © 2015 Couchbase, Inc.