Метод |
Описание |
|
__construct ( Builder $builder ) |
|
|
abs ( mixed | Expr $number ) |
Returns the absolute value of a number. |
|
add ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Adds numbers together or adds numbers and a date. If one of the arguments
is a date, $add treats the other arguments as milliseconds to add to the
date. |
|
addAnd ( array | Expr $expression ) |
Add one or more $and clauses to the current expression. |
|
addOr ( array | Expr $expression ) |
Add one or more $or clauses to the current expression. |
|
allElementsTrue ( mixed | Expr $expression ) |
Evaluates an array as a set and returns true if no element in the array
is false. Otherwise, returns false. An empty array returns true. |
|
anyElementTrue ( array | Expr $expression ) |
Evaluates an array as a set and returns true if any of the elements are
true and false otherwise. An empty array returns false. |
|
arrayElemAt ( mixed | Expr $array, mixed | Expr $index ) |
Returns the element at the specified array index. |
|
ceil ( mixed | Expr $number ) |
Returns the smallest integer greater than or equal to the specified number. |
|
cmp ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
-1 if the first value is less than the second. |
|
concat ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Concatenates strings and returns the concatenated string. |
|
concatArrays ( mixed | Expr $array1, mixed | Expr $array2 ) |
Concatenates arrays to return the concatenated array. |
|
cond ( mixed | Expr $if, mixed | Expr $then, mixed | Expr $else ) |
Evaluates a boolean expression to return one of the two specified return
expressions. |
|
dateToString ( string $format, mixed | Expr $expression ) |
Converts a date object to a string according to a user-specified format. |
|
dayOfMonth ( mixed | Expr $expression ) |
Returns the day of the month for a date as a number between 1 and 31. |
|
dayOfWeek ( mixed | Expr $expression ) |
Returns the day of the week for a date as a number between 1 (Sunday) and
7 (Saturday). |
|
dayOfYear ( mixed | Expr $expression ) |
Returns the day of the year for a date as a number between 1 and 366. |
|
divide ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Divides one number by another and returns the result. The first argument
is divided by the second argument. |
|
eq ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns whether they are equivalent. |
|
exp ( mixed | Expr $exponent ) |
Raises Euler’s number to the specified exponent and returns the result. |
|
expression ( mixed | Expr $value ) |
Used to use an expression as field value. Can be any expression |
|
field ( string $fieldName ) |
Set the current field for building the expression. |
|
filter ( mixed | Expr $input, mixed | Expr $as, mixed | Expr $cond ) |
Selects a subset of the array to return based on the specified condition. |
|
floor ( mixed | Expr $number ) |
Returns the largest integer less than or equal to the specified number. |
|
gt ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
true when the first value is greater than the second value. |
|
gte ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
true when the first value is greater than or equivalent to the second value. |
|
hour ( mixed | Expr $expression ) |
Returns the hour portion of a date as a number between 0 and 23. |
|
ifNull ( mixed | Expr $expression, mixed | Expr $replacementExpression ) |
Evaluates an expression and returns the value of the expression if the
expression evaluates to a non-null value. If the expression evaluates to
a null value, including instances of undefined values or missing fields,
returns the value of the replacement expression. |
|
isArray ( mixed | Expr $expression ) |
Determines if the operand is an array. Returns a boolean. |
|
let ( mixed | Expr $vars, mixed | Expr $in ) |
Binds variables for use in the specified expression, and returns the
result of the expression. |
|
literal ( mixed | Expr $value ) |
Returns a value without parsing. Use for values that the aggregation
pipeline may interpret as an expression. |
|
ln ( mixed | Expr $number ) |
Calculates the natural logarithm ln (i.e loge) of a number and returns
the result as a double. |
|
log ( mixed | Expr $number, mixed | Expr $base ) |
Calculates the log of a number in the specified base and returns the
result as a double. |
|
log10 ( mixed | Expr $number ) |
Calculates the log base 10 of a number and returns the result as a double. |
|
lt ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
true when the first value is less than the second value. |
|
lte ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
true when the first value is less than or equivalent to the second value. |
|
map ( mixed | Expr $input, string $as, mixed | Expr $in ) |
Applies an expression to each item in an array and returns an array with
the applied results. |
|
meta ( $metaDataKeyword ) |
Returns the metadata associated with a document in a pipeline operations. |
|
millisecond ( mixed | Expr $expression ) |
Returns the millisecond portion of a date as an integer between 0 and 999. |
|
minute ( mixed | Expr $expression ) |
Returns the minute portion of a date as a number between 0 and 59. |
|
mod ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Divides one number by another and returns the remainder. The first
argument is divided by the second argument. |
|
month ( mixed | Expr $expression ) |
Returns the month of a date as a number between 1 and 12. |
|
multiply ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Multiplies numbers together and returns the result. |
|
ne ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two values and returns:
true when the values are not equivalent. |
|
not ( mixed | Expr $expression ) |
Evaluates a boolean and returns the opposite boolean value. |
|
pow ( mixed | Expr $number, mixed | Expr $exponent ) |
Raises a number to the specified exponent and returns the result. |
|
second ( mixed | Expr $expression ) |
Returns the second portion of a date as a number between 0 and 59, but
can be 60 to account for leap seconds. |
|
setDifference ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Takes two sets and returns an array containing the elements that only
exist in the first set. |
|
setEquals ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Compares two or more arrays and returns true if they have the same
distinct elements and false otherwise. |
|
setIntersection ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Takes two or more arrays and returns an array that contains the elements
that appear in every input array. |
|
setIsSubset ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Takes two arrays and returns true when the first array is a subset of the
second, including when the first array equals the second array, and false
otherwise. |
|
setUnion ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Takes two or more arrays and returns an array containing the elements
that appear in any input array. |
|
size ( mixed | Expr $expression ) |
Counts and returns the total the number of items in an array. |
|
slice ( mixed | Expr $array, mixed | Expr $n, mixed | Expr | null $position = null ) |
Returns a subset of an array. |
|
sqrt ( mixed | Expr $expression ) |
Calculates the square root of a positive number and returns the result as
a double. |
|
strcasecmp ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Performs case-insensitive comparison of two strings. Returns
1 if first string is “greater than” the second string. |
|
substr ( mixed | Expr $string, mixed | Expr $start, mixed | Expr $length ) |
Returns a substring of a string, starting at a specified index position
and including the specified number of characters. The index is zero-based. |
|
subtract ( mixed | Expr $expression1, mixed | Expr $expression2 ) |
Subtracts two numbers to return the difference. The second argument is
subtracted from the first argument. |
|
toLower ( mixed | Expr $expression ) |
Converts a string to lowercase, returning the result. |
|
toUpper ( mixed | Expr $expression ) |
Converts a string to uppercase, returning the result. |
|
trunc ( mixed | Expr $number ) |
Truncates a number to its integer. |
|
week ( mixed | Expr $expression ) |
Returns the week of the year for a date as a number between 0 and 53. |
|
year ( mixed | Expr $expression ) |
Returns the year portion of a date. |
|