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 Expression
abs(Expression expression)
Returned expression results in the absolute value of the number.static Expression
abs(Number value)
Returned expression results in the absolute value of the number.static Expression
acos(Expression expression)
Returned expression results in the arccosine in radians.static Expression
acos(Number value)
Returned expression results in the arccosine in radians.static Expression
asin(Expression expression)
Returned expression results in the arcsine in radians.static Expression
asin(Number value)
Returned expression results in the arcsine in radians.static Expression
atan(Expression expression)
Returned expression results in the arctangent in radians.static Expression
atan(Expression expression1, Expression expression2)
Returned expression results in the arctangent of expression2/expression1.static Expression
atan(Number value)
Returned expression results in the arctangent in radians.static Expression
atan(String expression1, String expression2)
Returned expression results in the arctangent of expression2/expression1.static Expression
ceil(Expression expression)
Returned expression results in the smallest integer not less than the number.static Expression
ceil(Number value)
Returned expression results in the smallest integer not less than the number.static Expression
cos(Expression expression)
Returned expression results in the cosine.static Expression
cos(Number value)
Returned expression results in the cosine.static Expression
degrees(Expression expression)
Returned expression results in the conversion of radians to degrees.static Expression
degrees(Number value)
Returned expression results in the conversion of radians to degrees.static Expression
e()
Returned expression results in the base of natural logarithms.static Expression
exp(Expression expression)
Returned expression results in the exponential of expression.static Expression
exp(Number value)
Returned expression results in the exponential of expression.static Expression
floor(Expression expression)
Returned expression results in the largest integer not greater than the number.static Expression
floor(Number value)
Returned expression results in the largest integer not greater than the number.static Expression
ln(Expression expression)
Returned expression results in the log base e.static Expression
ln(Number value)
Returned expression results in the log base e.static Expression
log(Expression expression)
Returned expression results in the log base 10.static Expression
log(Number value)
Returned expression results in the log base 10.static Expression
pi()
Returned expression results in Pi.static Expression
power(Expression expression1, Expression expression2)
Returned expression results in expression1 to the power of expression2.static Expression
power(Number value1, Number value2)
Returned expression results in value1 to the power of value2.static Expression
radians(Expression expression)
Returned expression results in the conversion of degrees to radians.static Expression
radians(Number value)
Returned expression results in the conversion of degrees to radians.static Expression
random()
Returned expression results in a pseudo-random number with default seed.static Expression
random(Expression seed)
Returned expression results in a pseudo-random number with optional seed.static Expression
random(Number seed)
Returned expression results in a pseudo-random number with optional seed.static Expression
round(Expression expression)
Returned expression results in the value rounded to 0 digits to the right of the decimal point.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).static Expression
round(Number expression)
Returned expression results in the value rounded to 0 digits to the right of the decimal point.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).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.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.static Expression
sin(Expression expression)
Returned expression results in the sine.static Expression
sin(Number value)
Returned expression results in the sine.static Expression
squareRoot(Expression expression)
Returned expression results in the square root.static Expression
squareRoot(Number value)
Returned expression results in the square root.static Expression
tan(Expression expression)
Returned expression results in the tangent.static Expression
tan(Number value)
Returned expression results in the tangent.static Expression
trunc(Expression expression)
Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.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).static Expression
trunc(Number value)
Returned expression results in a truncation of the number to 0 digits to the right of the decimal point.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).
-
-
-
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.
-
-