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