/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import Type from '../types'; /** * Query expressions for creating Cosmos DB filters in operations such as {@link * TaskClient.list}, {@link TaskClient.listSummary}, {@link TaskClient.iterate} * and {@link TaskClient.iterateSummary}. * * @public */ declare namespace q { /** * Absolute value * * @public */ const abs: (num: Type.Num) => Type.UnaryMathFn; /** * Arccosine trigonometric function * * @public */ const acos: (num: Type.Num) => Type.UnaryMathFn; /** * Arcsine trigonometric function * * @public */ const asin: (num: Type.Num) => Type.UnaryMathFn; /** * Arctangent trigonometric function * * @public */ const atan: (num: Type.Num) => Type.UnaryMathFn; /** * Principal value of the arctangent of the second argument divided by the * first * * @public */ const atn2: (num1: Type.Num, num2: Type.Num) => Type.BinaryMathFn; /** * Round up to the nearest integer. * * @public */ const ceiling: (num: Type.Num) => Type.UnaryMathFn; /** * Cosine trigonometric function * * @public */ const cos: (num: Type.Num) => Type.UnaryMathFn; /** * Cotangent trigonometric function * * @public */ const cot: (num: Type.Num) => Type.UnaryMathFn; /** * Convert radians to degrees * * @public */ const degrees: (num: Type.Num) => Type.UnaryMathFn; /** * Take the exponential * * @public */ const exp: (num: Type.Num) => Type.UnaryMathFn; /** * Round down to the nearest integer * * @public */ const floor: (num: Type.Num) => Type.UnaryMathFn; /** * Take the natural logarithm, or the logarithm with the optional provided * base. * * @public */ const log: (num: Type.Num, base?: Type.Num) => Type.LogMathFn; /** * Take the base 10 logarithm * * @public */ const log10: (num: Type.Num) => Type.UnaryMathFn; /** * The constant pi (3.14159...) * * @public */ const pi: () => Type.EmptyMathFn; /** * Raise the expression to the given exponent. * * @public */ const power: (expr: Type.Num, exponent: Type.Num) => Type.BinaryMathFn; /** * Convert degrees to radians * * @public */ const radians: (num: Type.Num) => Type.UnaryMathFn; /** * Round to the nearest integer * * @public */ const round: (num: Type.Num) => Type.UnaryMathFn; /** * Sine trigonometric function * * @public */ const sin: (num: Type.Num) => Type.UnaryMathFn; /** * Take the square root * * @public */ const sqrt: (num: Type.Num) => Type.UnaryMathFn; /** * Raise the value to the 2nd power * * @public */ const square: (num: Type.Num) => Type.UnaryMathFn; /** * Returns 1, 0 or -1 depending on whether the sign of the value is * positive, zero or negative, respectively. * * @public */ const sign: (num: Type.Num) => Type.UnaryMathFn; /** * Tangent trigonometric function * * @public */ const tan: (num: Type.Num) => Type.UnaryMathFn; /** * Truncate the decimal portion of the value * * @public */ const trunc: (num: Type.Num) => Type.UnaryMathFn; /** * Returns true if the value is an array * * @public */ const isArray: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is a boolean * * @public */ const isBool: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is defined * * @public */ const isDefined: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is null * * @public */ const isNull: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is a number * * @public */ const isNumber: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is an object * * @public */ const isObject: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is a primitive value (string, number, boolean * or null) * * @public */ const isPrimitive: (val: Type.Any) => Type.TypeCheckFn; /** * Returns true if the value is a string * * @public */ const isString: (val: Type.Any) => Type.TypeCheckFn; /** * Check if the first string contains the second * * @public */ const contains: (str1: Type.Str, str2: Type.Str) => Type.BinaryStrFnBool; /** * Check if the first string ends with the second string * * @public */ const endsWith: (str1: Type.Str, str2: Type.Str) => Type.BinaryStrFnBool; /** * Returns the starting position of the second string within the first * string, or -1 if it is not found * * @public */ const indexOf: (str1: Type.Str, str2: Type.Str) => Type.BinaryStrFnNum; /** * Returns the left portion of the string up to the number of charaters * specified * * @public */ const left: (str: Type.Str, num: Type.Num) => Type.BinaryStrNumFnStr; /** * Returns the length of the string * * @public */ const length: (str: Type.Str) => Type.UnaryStrFnNum; /** * Convert the string to lower case * * @public */ const lower: (str: Type.Str) => Type.UnaryStrFnStr; /** * Trim whitespace from the left side of the string * * @public */ const ltrim: (str: Type.Str) => Type.UnaryStrFnStr; /** * Replace instances of the search string with the replacement string in the * input string * * @public */ const replace: (str: Type.Str, search: Type.Str, replace: Type.Str) => Type.TernaryStrFnStr; /** * Repeat the string the provided number of times * * @public */ const replicate: (str: Type.Str, num: Type.Num) => Type.BinaryStrNumFnStr; /** * Reverse the characters of the string * * @public */ const reverse: (str: Type.Str) => Type.UnaryStrFnStr; /** * Return the right portion of the string up to the number of characters * provided * * @public */ const right: (str: Type.Str, num: Type.Num) => Type.BinaryStrNumFnStr; /** * Trim whitespace from the right side of the string * * @public */ const rtrim: (str: Type.Str) => Type.UnaryStrFnStr; /** * Check whether the first string starts with the second * * @public */ const startsWith: (str1: Type.Str, str2: Type.Str) => Type.BinaryStrFnBool; /** * Return the portion of the string from the start potition up to the length * provided * * @public */ const substring: (str: Type.Str, start: Type.Num, length: Type.Num) => Type.Substring; /** * Convert the value to a string * * @public */ const toString: (val: Type.Any) => Type.ToString; /** * Trim whitespace from both ends of the string * * @public */ const trim: (str: Type.Str) => Type.UnaryStrFnStr; /** * Convert the string to upper case * * @public */ const upper: (str: Type.Str) => Type.UnaryStrFnStr; /** * Concatenate all of the provided arrays together. Requires at least two * arrays to concat. * * @public */ const arrayConcat: (array1: Type.Arr, array2: Type.Arr, ...more: Type.Arr[]) => Type.ArrayConcat; /** * Check whether the array contains the item specified. If partial is * true, then the item is matched if it is a valid portion of one of the * values, rather than having to be the full value. * * @public */ const arrayContains: (array: Type.Arr, item: Type.Any, partial?: Type.Bool) => Type.ArrayContains; /** * Compute the number of elements in the array * * @public */ const arrayLength: (array: Type.Arr) => Type.ArrayLength; /** * Return a subset of the array starting from the provided index and * optionally with the provided maximum length * * @public */ const arraySlice: (array: Type.Arr, start: Type.Num, length?: Type.Num) => Type.ArraySlice; /** * Returns the distance between two GeoJSON points, polygons or linestrings * * @public */ const stDistance: (spatial1: Type.Spatial, spatial2: Type.Spatial) => Type.StDistance; /** * Check whether the first GeoJSON point polygon or linestring is inside of * the GeoJSON point, polygon or linestring in the second argument * * @public */ const stWithin: (inner: Type.Spatial, outer: Type.Spatial) => Type.BinarySpatialFnBool; /** * Check whether the two GeoJSON points, polyhons, or linestrings intersect * one another * * @public */ const stIntersects: (spatial1: Type.Spatial, spatial2: Type.Spatial) => Type.BinarySpatialFnBool; /** * Check whether the value is a valid GeoJSON point, polygon or linestring * * @public */ const stIsValid: (spatial: Type.Spatial) => Type.StIsValid; /** * Check whether the value is a valid GeoJSON point, polygon or linestring, * returning an object with a `valid` boolean indicating whether the value * is valid and a `reason` property with a string describing the error if it * was not valid. * * @public */ const stIsValidDetailed: (spatial: Type.Spatial) => Type.StIsValidDetailed; /** * Boolean AND of two or more subexpressions * * @public */ const and: (...expressions: Type.Bool[]) => Type.BinaryLogical; /** * Boolean OR of two or more subexpressions * * @public */ const or: (...expressions: Type.Bool[]) => Type.BinaryLogical; /** * Boolean negation of the subexpression * * @public */ const not: (expression: Type.Bool) => Type.UnaryLogical; /** * Add the two numbers * * @public */ const add: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Subtract the second number from the first * * @public */ const subtract: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Multiply the two numbers * * @public */ const multiply: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Divide the first number by the second * * @public */ const divide: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Compute the modulus of dividing the first number by the second * * @public */ const modulo: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Take the bitwise OR of the two numbers * * @public */ const bitwiseOr: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Take the bitwise AND of the two numbers * * @public */ const bitwiseAnd: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Take the bitwise exclusive or of the two numbers * * @public */ const xor: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Shift the bits of the number to the left by the given amount * * @public */ const leftShift: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Shift the bits of the number to the right by the given amount * * @public */ const rightShift: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Shift the bits of the number to the right by the given amount, filling * the new leftmost bits with zeros * * @public */ const zeroFillRightShift: (left: Type.Num, right: Type.Num) => Type.Arithmetic; /** * Check whether the two values are equivalent * * @public */ const equal: (left: Type.Any, right: Type.Any) => Type.Equality; /** * Check whether the two values are not equivalent * * @public */ const notEqual: (left: Type.Any, right: Type.Any) => Type.Equality; /** * Check whether the first number is greater than the second * * @public */ const greaterThan: (left: Type.Num, right: Type.Num) => Type.Comparison; /** * Check whether the first number is greater than or equal to the second * * @public */ const greaterThanOrEqual: (left: Type.Num, right: Type.Num) => Type.Comparison; /** * Check whether the first number is less than the second * * @public */ const lessThan: (left: Type.Num, right: Type.Num) => Type.Comparison; /** * Check whether the first number is less than or equal to the second * * @public */ const lessThanOrEqual: (left: Type.Num, right: Type.Num) => Type.Comparison; /** * Return the first value if defined, or the second value if the first value * if the first value is undefined * * @public */ const coalesce: (first: Type.Any, second: Type.Any) => Type.Coalesce; /** * Concatenate two or more strings together into a single string * * @public */ const concat: (left: Type.Str, right: Type.Str, ...more: Type.Str[]) => Type.Concat; /** * If the condition is true, return the second argument. If it is false, * return the third. * * @public */ const ternary: (condition: Type.Bool, ifTrue: Type.Any, ifFalse: Type.Any) => Type.Ternary; /** * Check if the value is equal to one of the array of candidates in the * second argument * * @public */ const inOp: (value: Type.Any, candidates: Type.Any[]) => Type.In; } export default q; //# sourceMappingURL=query.d.ts.map