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
All Methods Static Methods Concrete Methods 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 Detail
-
isArray
public static Expression isArray(Expression expression)
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.
-
isArray
public static Expression isArray(String expression)
Returned expression results in True if expression is an array, otherwise returns MISSING, NULL or false.
-
isAtom
public static Expression isAtom(Expression expression)
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.
-
isAtom
public static Expression isAtom(String expression)
Returned expression results in True if expression is a Boolean, number, or string, otherwise returns MISSING, NULL or false.
-
isBoolean
public static Expression isBoolean(Expression expression)
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.
-
isBoolean
public static Expression isBoolean(String expression)
Returned expression results in True if expression is a Boolean, otherwise returns MISSING, NULL or false.
-
isNumber
public static Expression isNumber(Expression expression)
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.
-
isNumber
public static Expression isNumber(String expression)
Returned expression results in True if expression is a number, otherwise returns MISSING, NULL or false.
-
isObject
public static Expression isObject(Expression expression)
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.
-
isObject
public static Expression isObject(String expression)
Returned expression results in True if expression is an object, otherwise returns MISSING, NULL or false.
-
isString
public static Expression isString(Expression expression)
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.
-
isString
public static Expression isString(String expression)
Returned expression results in True if expression is a string, otherwise returns MISSING, NULL or false.
-
type
public 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"
-
type
public 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"
-
toArray
public static Expression toArray(Expression expression)
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
public static Expression toArray(String expression)
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
public static Expression toAtom(Expression expression)
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
public static Expression toAtom(String expression)
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
public static Expression toBoolean(Expression expression)
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
public static Expression toBoolean(String expression)
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
public static Expression toNumber(Expression expression)
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
public static Expression toNumber(String expression)
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
public static Expression toObject(Expression expression)
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
public static Expression toObject(String expression)
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
public static Expression toString(Expression expression)
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
public static Expression toString(String expression)
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.
-
-