Class N1QLExpression
java.lang.Object
org.springframework.data.couchbase.core.query.N1QLExpression
A N1QL Query Expression
- Author:
- Michael Nitschinger, Michael Reiche
-
Method Summary
Modifier and TypeMethodDescriptionand
(N1QLExpression right) AND-combines two expressions.as
(N1QLExpression alias) Adds a AS clause between the current and the given expression.asc()
between
(N1QLExpression right) Adds a BETWEEN clause between the current and the given expression.Returned expression will be converted to a stringstatic N1QLExpression
count
(N1QLExpression expression) Returned expression results in count of all the non-NULL and non-MISSING values in the group.static N1QLExpression
delete()
Begins a delete statementdesc()
static N1QLExpression
distinct
(N1QLExpression expression) Returned expression results in distinct of the expressioneq
(boolean value) eq
(N1QLExpression right) Combines two expressions with the equals operator ("=").static N1QLExpression
FALSE()
Returns an expression representing boolean FALSE.from
(N1QLExpression bucketName) gt
(N1QLExpression right) Combines two expressions with the greater than operator (">").gte
(N1QLExpression right) Combines two expressions with the greater or equals than operator (">=").static N1QLExpression
An identifier or list of identifiers escaped using backquotes `.in
(N1QLExpression right) Adds a IN clause between the current and the given expression.Appends a "IS NOT MISSING" to the expression.Appends a "IS NOT NULL" to the expression.isNull()
Appends a "IS NULL" to the expression.keys
(Iterable<? extends Serializable> ids) like
(N1QLExpression right) Adds a LIKE clause between the current and the given expression.limit
(int limit) lower()
Returned expression results in the given expression in lowercase.lt
(N1QLExpression right) Combines two expressions with the less than operator ("<").lte
(N1QLExpression right) Combines two expressions with the less or equals than operator ("<=").static N1QLExpression
meta
(N1QLExpression expression) static N1QLExpression
MISSING()
Returns an expression representing MISSING.ne
(N1QLExpression right) Combines two expressions with the not equals operator ("!notIn
(N1QLExpression right) Adds a NOT IN clause between the current and the given expression.notLike
(N1QLExpression right) Adds a NOT LIKE clause between the current and the given expression.static N1QLExpression
NULL()
Returns an expression representing NULL.offset
(int offset) or
(N1QLExpression right) OR-combines two expressions.orderBy
(N1QLExpression... expressions) static N1QLExpression
Construct a path ("a.b.c") from Expressions or values.returning
(N1QLExpression right) static N1QLExpression
An identifier or list of identifiers which will be quoted as strings (with "").static N1QLExpression
select
(N1QLExpression... expressions) Prepends a SELECT to the given expressiontoString()
static N1QLExpression
TRUE()
Returns an expression representing boolean TRUE.where
(N1QLExpression right) static N1QLExpression
WRAPPER()
Returns an expression representing WRAPPER.static N1QLExpression
Creates an arbitrary expression from the given string value.
-
Method Details
-
x
Creates an arbitrary expression from the given string value. No quoting or escaping will be done on the input. In addition, it is not checked if the given value is an actual valid (N1QL syntax wise) expression.- Parameters:
value
- the value to create the expression from.- Returns:
- a new
N1QLExpression
representing the value.
-
i
An identifier or list of identifiers escaped using backquotes `. Useful for example for identifiers that contains a dash like "beer-sample". Multiple identifiers are returned as a list of escaped identifiers separated by ", ".- Parameters:
identifiers
- the identifier(s) to escape.- Returns:
- an
N1QLExpression
representing the escaped identifier.
-
s
An identifier or list of identifiers which will be quoted as strings (with "").- Parameters:
strings
- the list of strings to quote.- Returns:
- an
N1QLExpression
representing the quoted strings.
-
TRUE
Returns an expression representing boolean TRUE.- Returns:
- an expression representing TRUE.
-
FALSE
Returns an expression representing boolean FALSE.- Returns:
- an expression representing FALSE.
-
NULL
Returns an expression representing NULL.- Returns:
- an expression representing NULL.
-
WRAPPER
Returns an expression representing WRAPPER.- Returns:
- an expression representing WRAPPER.
-
MISSING
Returns an expression representing MISSING.- Returns:
- an expression representing MISSING.
-
path
Construct a path ("a.b.c") from Expressions or values. Strings are considered identifiers (so they won't be quoted).- Parameters:
pathComponents
- the elements of the path, joined together by a dot.- Returns:
- the path created from the given components.
-
meta
- Returns:
- metadata for the document expression
-
select
Prepends a SELECT to the given expression -
delete
Begins a delete statement -
count
Returned expression results in count of all the non-NULL and non-MISSING values in the group. -
distinct
Returned expression results in distinct of the expression -
and
AND-combines two expressions.- Parameters:
right
- the expression to combine with the current one.- Returns:
- a combined expression.
-
or
OR-combines two expressions.- Parameters:
right
- the expression to combine with the current one.- Returns:
- a combined expression.
-
as
Adds a AS clause between the current and the given expression. Often used to alias an identifier.- Parameters:
alias
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
from
-
from
-
where
-
returning
-
keys
-
lower
Returned expression results in the given expression in lowercase. -
convertToString
Returned expression will be converted to a string -
eq
Combines two expressions with the equals operator ("=").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
eq
-
asc
-
desc
-
limit
-
offset
-
between
Adds a BETWEEN clause between the current and the given expression.- Parameters:
right
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
gt
Combines two expressions with the greater than operator (">").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
isNull
Appends a "IS NULL" to the expression.- Returns:
- the postfixed expression.
-
isNotNull
Appends a "IS NOT NULL" to the expression.- Returns:
- the postfixed expression.
-
ne
Combines two expressions with the not equals operator ("!=").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
gte
Combines two expressions with the greater or equals than operator (">=").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
lte
Combines two expressions with the less or equals than operator ("<=").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
like
Adds a LIKE clause between the current and the given expression.- Parameters:
right
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
notLike
Adds a NOT LIKE clause between the current and the given expression.- Parameters:
right
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
in
Adds a IN clause between the current and the given expression.- Parameters:
right
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
notIn
Adds a NOT IN clause between the current and the given expression.- Parameters:
right
- the right hand side expression.- Returns:
- a new expression with the clause applied.
-
isNotMissing
Appends a "IS NOT MISSING" to the expression.- Returns:
- the postfixed expression.
-
lt
Combines two expressions with the less than operator ("<").- Parameters:
right
- the expression to combine.- Returns:
- the combined expressions.
-
orderBy
-
toString
-