Class TypeFunctions
java.lang.Object
com.couchbase.client.java.query.dsl.functions.TypeFunctions
@Experimental @Public public class TypeFunctions extends Object
DSL for N1QL functions in the Type category.
- Since:
- 2.2
- Author:
- Simon Baslé
-
Method Summary
Modifier and Type Method Description static Expression
isArray(Expression expression)
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.static Expression
isArray(String expression)
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.static Expression
isAtom(Expression expression)
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.static Expression
isAtom(String expression)
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.static Expression
isBoolean(Expression expression)
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.static Expression
isBoolean(String expression)
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.static Expression
isNumber(Expression expression)
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.static Expression
isNumber(String expression)
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.static Expression
isObject(Expression expression)
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.static Expression
isObject(String expression)
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.static Expression
isString(Expression expression)
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.static Expression
isString(String expression)
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.static Expression
toArray(Expression expression)
Returned expression results in an array as follows: - MISSING is MISSING.static Expression
toArray(String expression)
Returned expression results in an array as follows: - MISSING is MISSING.static Expression
toAtom(Expression expression)
Returned expression results in an atomic value as follows: - MISSING is MISSING.static Expression
toAtom(String expression)
Returned expression results in an atomic value as follows: - MISSING is MISSING.static Expression
toBoolean(Expression expression)
Returned expression results in a Boolean as follows: - MISSING is MISSING.static Expression
toBoolean(String expression)
Returned expression results in a Boolean as follows: - MISSING is MISSING.static Expression
toNumber(Expression expression)
Returned expression results in a number as follows: - MISSING is MISSING.static Expression
toNumber(String expression)
Returned expression results in a number as follows: - MISSING is MISSING.static Expression
toObject(Expression expression)
Returned expression results in an object as follows: - MISSING is MISSING.static Expression
toObject(String expression)
Returned expression results in an object as follows: - MISSING is MISSING.static Expression
toString(Expression expression)
Returned expression results in a string as follows: - MISSING is MISSING.static Expression
toString(String expression)
Returned expression results in a string as follows: - MISSING is MISSING.static Expression
type(Expression expression)
Returned expression results in one of the following strings, based on the value of expression: - "missing" - "null" - "boolean" - "number" - "string" - "array" - "object" - "binary"static Expression
type(String expression)
Returned expression results in one of the following strings, based on the value of expression: - "missing" - "null" - "boolean" - "number" - "string" - "array" - "object" - "binary"
-
Method Details
-
isArray
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false. -
isArray
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false. -
isAtom
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false. -
isAtom
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false. -
isBoolean
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false. -
isBoolean
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false. -
isNumber
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false. -
isNumber
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false. -
isObject
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false. -
isObject
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false. -
isString
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false. -
isString
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false. -
type
Returned expression results in one of the following strings, based on the value of expression: - "missing" - "null" - "boolean" - "number" - "string" - "array" - "object" - "binary" -
type
Returned expression results in one of the following strings, based on the value of expression: - "missing" - "null" - "boolean" - "number" - "string" - "array" - "object" - "binary" -
toArray
Returned expression results in an array as follows: - MISSING is MISSING. - NULL is NULL. - Arrays are themselves. - All other values are wrapped in an array. - TOATOM(expression) -
toArray
Returned expression results in an array as follows: - MISSING is MISSING. - NULL is NULL. - Arrays are themselves. - All other values are wrapped in an array. - TOATOM(expression) -
toAtom
Returned expression results in an atomic value as follows: - MISSING is MISSING. - NULL is NULL. - Arrays of length 1 are the result of TOATOM() on their single element. - Objects of length 1 are the result of TOATOM() on their single value. - Booleans, numbers, and strings are themselves. - All other values are NULL. -
toAtom
Returned expression results in an atomic value as follows: - MISSING is MISSING. - NULL is NULL. - Arrays of length 1 are the result of TOATOM() on their single element. - Objects of length 1 are the result of TOATOM() on their single value. - Booleans, numbers, and strings are themselves. - All other values are NULL. -
toBoolean
Returned expression results in a Boolean as follows: - MISSING is MISSING. - NULL is NULL. - False is false. - Numbers +0, -0, and NaN are false. - Empty strings, arrays, and objects are false. - All other values are true. -
toBoolean
Returned expression results in a Boolean as follows: - MISSING is MISSING. - NULL is NULL. - False is false. - Numbers +0, -0, and NaN are false. - Empty strings, arrays, and objects are false. - All other values are true. -
toNumber
Returned expression results in a number as follows: - MISSING is MISSING. - NULL is NULL. - False is 0. - True is 1. - Numbers are themselves. - Strings that parse as numbers are those numbers. - All other values are NULL. -
toNumber
Returned expression results in a number as follows: - MISSING is MISSING. - NULL is NULL. - False is 0. - True is 1. - Numbers are themselves. - Strings that parse as numbers are those numbers. - All other values are NULL. -
toObject
Returned expression results in an object as follows: - MISSING is MISSING. - NULL is NULL. - Objects are themselves. - All other values are the empty object. -
toObject
Returned expression results in an object as follows: - MISSING is MISSING. - NULL is NULL. - Objects are themselves. - All other values are the empty object. -
toString
Returned expression results in a string as follows: - MISSING is MISSING. - NULL is NULL. - False is "false". - True is "true". - Numbers are their string representation. - Strings are themselves. - All other values are NULL. -
toString
Returned expression results in a string as follows: - MISSING is MISSING. - NULL is NULL. - False is "false". - True is "true". - Numbers are their string representation. - Strings are themselves. - All other values are NULL.
-