Class NumberFunctions
- java.lang.Object
-
- com.couchbase.client.java.query.dsl.functions.NumberFunctions
-
@Experimental @Public public class NumberFunctions extends Object
DSL for N1QL functions in the Numbers category. Number functions are functions that are performed on a numeric field.- Since:
- 2.2
- Author:
- Simon Baslé
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Expressionabs(Expression expression)Returned expression results in the absolute value of the number.static Expressionabs(Number value)Returned expression results in the absolute value of the number.static Expressionacos(Expression expression)Returned expression results in the arccosine in radians.static Expressionacos(Number value)Returned expression results in the arccosine in radians.static Expressionasin(Expression expression)Returned expression results in the arcsine in radians.static Expressionasin(Number value)Returned expression results in the arcsine in radians.static Expressionatan(Expression expression)Returned expression results in the arctangent in radians.static Expressionatan(Expression expression1, Expression expression2)Returned expression results in the arctangent of expression2/expression1.static Expressionatan(Number value)Returned expression results in the arctangent in radians.static Expressionatan(String expression1, String expression2)Returned expression results in the arctangent of expression2/expression1.static Expressionceil(Expression expression)Returned expression results in the smallest integer not less than the number.static Expressionceil(Number value)Returned expression results in the smallest integer not less than the number.static Expressioncos(Expression expression)Returned expression results in the cosine.static Expressioncos(Number value)Returned expression results in the cosine.static Expressiondegrees(Expression expression)Returned expression results in the conversion of radians to degrees.static Expressiondegrees(Number value)Returned expression results in the conversion of radians to degrees.static Expressione()Returned expression results in the base of natural logarithms.static Expressionexp(Expression expression)Returned expression results in the exponential of expression.static Expressionexp(Number value)Returned expression results in the exponential of expression.static Expressionfloor(Expression expression)Returned expression results in the largest integer not greater than the number.static Expressionfloor(Number value)Returned expression results in the largest integer not greater than the number.static Expressionln(Expression expression)Returned expression results in the log base e.static Expressionln(Number value)Returned expression results in the log base e.static Expressionlog(Expression expression)Returned expression results in the log base 10.static Expressionlog(Number value)Returned expression results in the log base 10.static Expressionpi()Returned expression results in Pi.static Expressionpower(Expression expression1, Expression expression2)Returned expression results in expression1 to the power of expression2.static Expressionpower(Number value1, Number value2)Returned expression results in value1 to the power of value2.static Expressionradians(Expression expression)Returned expression results in the conversion of degrees to radians.static Expressionradians(Number value)Returned expression results in the conversion of degrees to radians.static Expressionrandom()Returned expression results in a pseudo-random number with default seed.static Expressionrandom(Expression seed)Returned expression results in a pseudo-random number with optional seed.static Expressionrandom(Number seed)Returned expression results in a pseudo-random number with optional seed.static Expressionround(Expression expression)Returned expression results in the value rounded to 0 digits to the right of the decimal point.static Expressionround(Expression expression, int digits)Returned expression results in the value rounded to the given number of integer digits to the right of the decimal point (left if digits is negative).static Expressionround(Number expression)Returned expression results in the value rounded to 0 digits to the right of the decimal point.static Expressionround(Number expression, int digits)Returned expression results in the value rounded to the given number of integer digits to the right of the decimal point (left if digits is negative).static Expressionsign(Expression expression)Returned expression results in the sign of the numerical expression, represented as -1, 0, or 1 for negative, zero, or positive numbers respectively.static Expressionsign(Number value)Returned expression results in the sign of the numerical expression, represented as -1, 0, or 1 for negative, zero, or positive numbers respectively.static Expressionsin(Expression expression)Returned expression results in the sine.static Expressionsin(Number value)Returned expression results in the sine.static ExpressionsquareRoot(Expression expression)Returned expression results in the square root.static ExpressionsquareRoot(Number value)Returned expression results in the square root.static Expressiontan(Expression expression)Returned expression results in the tangent.static Expressiontan(Number value)Returned expression results in the tangent.static Expressiontrunc(Expression expression)Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.static Expressiontrunc(Expression expression, int digits)Returned expression results in a truncation of the number to the given number of integer digits to the right of the decimal point (left if digits is negative).static Expressiontrunc(Number value)Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.static Expressiontrunc(Number value, int digits)Returned expression results in a truncation of the number to the given number of integer digits to the right of the decimal point (left if digits is negative).
-
-
-
Method Detail
-
abs
public static Expression abs(Expression expression)
Returned expression results in the absolute value of the number.
-
abs
public static Expression abs(Number value)
Returned expression results in the absolute value of the number.
-
acos
public static Expression acos(Expression expression)
Returned expression results in the arccosine in radians.
-
acos
public static Expression acos(Number value)
Returned expression results in the arccosine in radians.
-
asin
public static Expression asin(Expression expression)
Returned expression results in the arcsine in radians.
-
asin
public static Expression asin(Number value)
Returned expression results in the arcsine in radians.
-
atan
public static Expression atan(Expression expression)
Returned expression results in the arctangent in radians.
-
atan
public static Expression atan(Number value)
Returned expression results in the arctangent in radians.
-
atan
public static Expression atan(Expression expression1, Expression expression2)
Returned expression results in the arctangent of expression2/expression1.
-
atan
public static Expression atan(String expression1, String expression2)
Returned expression results in the arctangent of expression2/expression1.
-
ceil
public static Expression ceil(Expression expression)
Returned expression results in the smallest integer not less than the number.
-
ceil
public static Expression ceil(Number value)
Returned expression results in the smallest integer not less than the number.
-
cos
public static Expression cos(Expression expression)
Returned expression results in the cosine.
-
cos
public static Expression cos(Number value)
Returned expression results in the cosine.
-
degrees
public static Expression degrees(Expression expression)
Returned expression results in the conversion of radians to degrees.
-
degrees
public static Expression degrees(Number value)
Returned expression results in the conversion of radians to degrees.
-
e
public static Expression e()
Returned expression results in the base of natural logarithms.
-
exp
public static Expression exp(Expression expression)
Returned expression results in the exponential of expression.
-
exp
public static Expression exp(Number value)
Returned expression results in the exponential of expression.
-
ln
public static Expression ln(Expression expression)
Returned expression results in the log base e.
-
ln
public static Expression ln(Number value)
Returned expression results in the log base e.
-
log
public static Expression log(Expression expression)
Returned expression results in the log base 10.
-
log
public static Expression log(Number value)
Returned expression results in the log base 10.
-
floor
public static Expression floor(Expression expression)
Returned expression results in the largest integer not greater than the number.
-
floor
public static Expression floor(Number value)
Returned expression results in the largest integer not greater than the number.
-
pi
public static Expression pi()
Returned expression results in Pi.
-
power
public static Expression power(Expression expression1, Expression expression2)
Returned expression results in expression1 to the power of expression2.
-
power
public static Expression power(Number value1, Number value2)
Returned expression results in value1 to the power of value2.
-
radians
public static Expression radians(Expression expression)
Returned expression results in the conversion of degrees to radians.
-
radians
public static Expression radians(Number value)
Returned expression results in the conversion of degrees to radians.
-
random
public static Expression random(Expression seed)
Returned expression results in a pseudo-random number with optional seed.
-
random
public static Expression random(Number seed)
Returned expression results in a pseudo-random number with optional seed.
-
random
public static Expression random()
Returned expression results in a pseudo-random number with default seed.
-
round
public static Expression round(Expression expression)
Returned expression results in the value rounded to 0 digits to the right of the decimal point.
-
round
public static Expression round(Expression expression, int digits)
Returned expression results in the value rounded to the given number of integer digits to the right of the decimal point (left if digits is negative).
-
round
public static Expression round(Number expression)
Returned expression results in the value rounded to 0 digits to the right of the decimal point.
-
round
public static Expression round(Number expression, int digits)
Returned expression results in the value rounded to the given number of integer digits to the right of the decimal point (left if digits is negative).
-
sign
public static Expression sign(Expression expression)
Returned expression results in the sign of the numerical expression, represented as -1, 0, or 1 for negative, zero, or positive numbers respectively.
-
sign
public static Expression sign(Number value)
Returned expression results in the sign of the numerical expression, represented as -1, 0, or 1 for negative, zero, or positive numbers respectively.
-
sin
public static Expression sin(Expression expression)
Returned expression results in the sine.
-
sin
public static Expression sin(Number value)
Returned expression results in the sine.
-
squareRoot
public static Expression squareRoot(Expression expression)
Returned expression results in the square root.
-
squareRoot
public static Expression squareRoot(Number value)
Returned expression results in the square root.
-
tan
public static Expression tan(Expression expression)
Returned expression results in the tangent.
-
tan
public static Expression tan(Number value)
Returned expression results in the tangent.
-
trunc
public static Expression trunc(Expression expression, int digits)
Returned expression results in a truncation of the number to the given number of integer digits to the right of the decimal point (left if digits is negative).
-
trunc
public static Expression trunc(Number value, int digits)
Returned expression results in a truncation of the number to the given number of integer digits to the right of the decimal point (left if digits is negative).
-
trunc
public static Expression trunc(Expression expression)
Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.
-
trunc
public static Expression trunc(Number value)
Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.
-
-