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 ExpressionisArray(Expression expression)Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.static ExpressionisArray(String expression)Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.static ExpressionisAtom(Expression expression)Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.static ExpressionisAtom(String expression)Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.static ExpressionisBoolean(Expression expression)Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.static ExpressionisBoolean(String expression)Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.static ExpressionisNumber(Expression expression)Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.static ExpressionisNumber(String expression)Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.static ExpressionisObject(Expression expression)Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.static ExpressionisObject(String expression)Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.static ExpressionisString(Expression expression)Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.static ExpressionisString(String expression)Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.static ExpressiontoArray(Expression expression)Returned expression results in an array as follows: - MISSING is MISSING.static ExpressiontoArray(String expression)Returned expression results in an array as follows: - MISSING is MISSING.static ExpressiontoAtom(Expression expression)Returned expression results in an atomic value as follows: - MISSING is MISSING.static ExpressiontoAtom(String expression)Returned expression results in an atomic value as follows: - MISSING is MISSING.static ExpressiontoBoolean(Expression expression)Returned expression results in a Boolean as follows: - MISSING is MISSING.static ExpressiontoBoolean(String expression)Returned expression results in a Boolean as follows: - MISSING is MISSING.static ExpressiontoNumber(Expression expression)Returned expression results in a number as follows: - MISSING is MISSING.static ExpressiontoNumber(String expression)Returned expression results in a number as follows: - MISSING is MISSING.static ExpressiontoObject(Expression expression)Returned expression results in an object as follows: - MISSING is MISSING.static ExpressiontoObject(String expression)Returned expression results in an object as follows: - MISSING is MISSING.static ExpressiontoString(Expression expression)Returned expression results in a string as follows: - MISSING is MISSING.static ExpressiontoString(String expression)Returned expression results in a string as follows: - MISSING is MISSING.static Expressiontype(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 Expressiontype(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.
-