import { BigintType, BooleanArg, CharacterArg, DoubleType, InferMathTypePrec, IntegerType, NumericType, IntegralArg, IntegerArg, ToMathExpression, MathArg, NumericArg, BigintArg, ArrayArg, Type } from '../types'; import { Expression } from '../expressions'; /** * @description Absolute value */ export declare function ABS(operand: T): ToMathExpression; /** * @description Cube root */ export declare function CBRT(operand: MathArg): Expression; /** * @description Nearest integer greater than or equal to argument */ export declare function CEIL(operand: Expression): Expression; export declare function CEIL(operand: MathArg): Expression; /** * @description Converts radians to degrees */ export declare function DEGREES(operand: MathArg): Expression; /** * @description Integer quotient of y/x (truncates towards zero) */ export declare function DIV(a: NumericArg, b: NumericArg): Expression; /** * @description Integer quotient of y/x (truncates towards zero) */ export declare function EXP(operand: Expression): Expression; export declare function EXP(operand: MathArg): Expression; /** * @description Factorial */ export declare function FACTORIAL(operand: BigintArg): Expression; /** * @description Nearest integer less than or equal to argument */ export declare function FLOOR(operand: Expression): Expression; export declare function FLOOR(operand: MathArg): Expression; /** * @description Greatest common divisor (the largest positive number that divs both inputs with no remainder); * returns 0 if both inputs are zero; available for integer, bigint, and numeric */ export declare function GCD(x: X, y: Y): InferMathTypePrec['type'], ToMathExpression['type']>['expression']; /** * @description Least common multiple (the smallest strictly * positive number that is an integral multiple of both inputs) * returns 0 if either input is zero; available for integer, bigint, and numeric */ export declare function LCM(x: X, y: Y): InferMathTypePrec['type'], ToMathExpression['type']>['expression']; /** * @description Natural logarithm */ export declare function LN(operand: Expression): Expression; export declare function LN(operand: MathArg): Expression; /** * @description Base 10 logarithm */ export declare function LOG10(operand: Expression): Expression; export declare function LOG10(operand: MathArg): Expression; /** * @description Logarithm of x to base b */ export declare function LOG(b: NumericArg, x: NumericArg): Expression; /** * @description Minimum scale (number of fractional decimal digits) needed to represent the supplied value precisely */ export declare function MIN_SCALE(operand: NumericArg): Expression; /** * @description Remainder of y/x */ export declare function MOD(x: X, y: Y): InferMathTypePrec['type'], ToMathExpression['type']>['expression']; /** * @description Approximate value of π */ export declare function PI(): Expression; /** * @description a raised to the power of b */ export declare function POWER(x: Expression, y: Expression): Expression; export declare function POWER(x: MathArg, y: MathArg): Expression; /** * @description Converts degrees to radians */ export declare function RADIANS(a: MathArg): Expression; export declare function ROUND(v: NumericArg, s: IntegerArg): Expression; export declare function ROUND(v: Expression): Expression; export declare function ROUND(v: MathArg): Expression; export declare function SCALE(v: NumericArg): Expression; /** * @description Sign of the argument (-1, 0, or +1) */ export declare function SIGN(v: Expression): Expression; export declare function SIGN(v: MathArg): Expression; /** * @description Square root */ export declare function SQRT(v: Expression): Expression; export declare function SQRT(v: MathArg): Expression; /** * @description Reduces the value's scale (number of fractional decimal digits) by removing trailing zeroes */ export declare function TRIM_SCALE(v: NumericArg): Expression; /** * @description Reduces the value's scale (number of fractional decimal digits) by removing trailing zeroes */ export declare function TRUNC(v: Expression): Expression; export declare function TRUNC(v: NumericArg, s: IntegerArg): Expression; export declare function TRUNC(v: MathArg): Expression; /** * @description Returns the number of the bucket in which operand falls in a histogram having * count equal-width buckets spanning the range low to high. Returns 0 or count+1 for an input outside that range. */ export declare function WIDTH_BUCKET(operand: MathArg, low: MathArg, high: MathArg, count: IntegerArg): Expression; export declare function WIDTH_BUCKET(operand: any, low: ArrayArg): Expression; /** * @description Returns a random value in the range 0.0 <= x < 1.0 */ export declare function RANDOM(): Expression; /** * @description Sets the seed for subsequent random() calls; argument must be between -1.0 and 1.0, inclusive */ export declare function SETSEED(seed: MathArg): Expression; /** * @description Advances the sequence object to its next value and returns that value. * This is done atomically: even if multiple sessions execute nextval concurrently, each * will safely receive a distinct sequence value. If the sequence object has * been created with default parameters, successive nextval calls will return successive values * beginning with 1. Other behaviors can be obtained by using appropriate parameters * in the CREATE SEQUENCE command. */ export declare function NEXTVAL(regclass: CharacterArg): Expression; /** * @description Sets the sequence object's current value, and optionally its is_called flag. The * two-parameter form sets the sequence's last_value field to the specified value and * sets its is_called field to true, meaning that the next nextval will * advance the sequence before returning a value. The value that will be * reported by currval is also set to the specified value. In the * three-parameter form, is_called can be set to either true or false. true * has the same effect as the two-parameter form. If it is set * to false, the next nextval will return exactly the specified value, and * sequence advancement commences with the following nextval. Furthermore, the value reported by * currval is not changed in this case. For example, */ export declare function SETVAL(regclass: CharacterArg, val: IntegralArg, flag: BooleanArg): Expression; /** * @description Returns the value most recently obtained by nextval for this sequence in * the current session. (An error is reported if nextval has never been * called for this sequence in this session.) Because this is returning a * session-local value, it gives a predictable answer whether or not other sessions * have executed nextval since the current session did. */ export declare function CURRVAL(regclass: CharacterArg): Expression; /** * @description Returns the value most recently returned by nextval in the current session. * This function is identical to currval, except that instead of taking the * sequence name as an argument it refers to whichever sequence nextval was * most recently applied to in the current session. It is an error * to call lastval if nextval has not yet been called in the * current session. */ export declare function LASTVAL(): Expression; export declare function ACOS(operand: MathArg): Expression; export declare function ACOSD(operand: MathArg): Expression; export declare function ASIN(operand: MathArg): Expression; export declare function ASIND(operand: MathArg): Expression; export declare function ATAN(operand: MathArg): Expression; export declare function ATAND(operand: MathArg): Expression; export declare function ATAN2(y: MathArg, x: MathArg): Expression; export declare function ATAN2D(y: MathArg, x: MathArg): Expression; export declare function COS(y: MathArg): Expression; export declare function COSD(y: MathArg): Expression; export declare function COT(y: MathArg): Expression; export declare function COTD(y: MathArg): Expression; export declare function SIN(y: MathArg): Expression; export declare function SIND(y: MathArg): Expression; export declare function TAN(y: MathArg): Expression; export declare function TAND(y: MathArg): Expression; export declare function SINH(y: MathArg): Expression; export declare function COSH(y: MathArg): Expression; export declare function TANH(y: MathArg): Expression; export declare function ASINH(y: MathArg): Expression; export declare function ACOSH(y: MathArg): Expression; export declare function ATANH(y: MathArg): Expression; export declare function TO_NUMBER(date: CharacterArg, to: CharacterArg): Expression;