LookupStageOperators¶
interface LookupStageOperators<LocalDocument : Any, ForeignDocument : Any> : CompoundBsonNode, AggregationOperators, FieldDsl
The operators allowed in a lookup stage.
Properties¶
context¶
@LowLevelApi
abstract val context: BsonContext
The context used to generate this expression.
dayOfMonth¶
open val <R : Any> KProperty1<R, Instant>.dayOfMonth: Value<R, Int>
Returns the day of the month for a date as a number between 1 and 31.
@get:JvmName(name = "dayOfMonthOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.dayOfMonth: Value<R, Int>
Returns the day of the month for a date as a number between 1 and 31.
@get:JvmName(name = "dayOfMonthOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.dayOfMonth: Value<R, Int>
Returns the day of the month for a date as a number between 1 and 31.
open val Instant.dayOfMonth: Value<Any, Int>
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
Returns the day of the month for a date as a number between 1 and 31.
dayOfWeekISO¶
open val <R : Any> KProperty1<R, Instant>.dayOfWeekISO: Value<R, Int>
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
@get:JvmName(name = "dayOfWeekISOOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.dayOfWeekISO: Value<R, Int>
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
@get:JvmName(name = "dayOfWeekISOOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.dayOfWeekISO: Value<R, Int>
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
open val Instant.dayOfWeekISO: Value<Any, Int>
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
dayOfWeekUS¶
open val <R : Any> KProperty1<R, Instant>.dayOfWeekUS: Value<R, Int>
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
@get:JvmName(name = "dayOfWeekUSOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.dayOfWeekUS: Value<R, Int>
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
@get:JvmName(name = "dayOfWeekUSOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.dayOfWeekUS: Value<R, Int>
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
open val Instant.dayOfWeekUS: Value<Any, Int>
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
dayOfYear¶
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
Returns the day of the year for a date as a number between 1 and 366.
field¶
Converts a Kotlin property into a Field.
hour¶
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
Returns the hour portion of a date as a number between 0 and 23.
isArray¶
Determines if this value is an array.
isNumber¶
Determines if this value is a number.
length¶
Returns the number of code points in the specified string.
Returns the number of code points in the specified string.
Returns the number of code points in the specified string.
Returns the number of code points in the specified string.
lengthUTF8¶
open val String?.lengthUTF8: Value<Any, Int?>
Returns the number of UTF-8 encoded bytes in the specified string.
open val <Context : Any> KProperty1<Context, String?>.lengthUTF8: Value<Context, Int?>
Returns the number of UTF-8 encoded bytes in the specified string.
Returns the number of UTF-8 encoded bytes in the specified string.
Returns the number of UTF-8 encoded bytes in the specified string.
millisecond¶
open val <R : Any> KProperty1<R, Instant>.millisecond: Value<R, Int>
Returns the millisecond portion of a date as a number between 0 and 999.
@get:JvmName(name = "millisecondOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.millisecond: Value<R, Int>
Returns the millisecond portion of a date as a number between 0 and 999.
@get:JvmName(name = "millisecondOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.millisecond: Value<R, Int>
Returns the millisecond portion of a date as a number between 0 and 999.
open val Instant.millisecond: Value<Any, Int>
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
Returns the millisecond portion of a date as a number between 0 and 999.
minute¶
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
Returns the minute portion of a date as a number between 0 and 59.
month¶
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
Returns the month of a date as a number between 1 and 12.
second¶
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
Returns the second portion of a date as a number between 0 and 60 (leap seconds).
type¶
Gets the BsonType of the current value.
weekISO¶
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
Returns the week number in ISO 8601 format, ranging from 1 to 53.
weekUS¶
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
Returns the week of the year for a date, ranging from 0 to 53.
year¶
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
Returns the year portion of a date.
yearOfISOWeek¶
open val <R : Any> KProperty1<R, Instant>.yearOfISOWeek: Value<R, Int>
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
@get:JvmName(name = "yearOfISOWeekOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.yearOfISOWeek: Value<R, Int>
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
@get:JvmName(name = "yearOfISOWeekOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.yearOfISOWeek: Value<R, Int>
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
open val Instant.yearOfISOWeek: Value<Any, Int>
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Returns the year in ISO 8601 format, corresponding to the ISO week number returned by weekISO.
Functions¶
abs¶
The absolute value of a number.
The absolute value of a number.
The absolute value of a number.
The absolute value of a number.
accept¶
@LowLevelApi
@DangerousMongoApi
abstract override fun accept(node: BsonNode)
Adds a new node as a child of this one.
acceptAll¶
@LowLevelApi
@DangerousMongoApi
fun <N : Node> CompoundNode<N>.acceptAll(nodes: Iterable<N>)
Adds any number of nodes into this one.
acos¶
The inverse cosine (arc cosine) of a value, in radians.
The inverse cosine (arc cosine) of a value, in radians.
The inverse cosine (arc cosine) of a value, in radians.
The inverse cosine (arc cosine) of a value, in radians.
acosh¶
The inverse hyperbolic cosine (hyperbolic arc cosine) of a value, in radians.
The inverse hyperbolic cosine (hyperbolic arc cosine) of a value, in radians.
The inverse hyperbolic cosine (hyperbolic arc cosine) of a value, in radians.
The inverse hyperbolic cosine (hyperbolic arc cosine) of a value, in radians.
asin¶
The inverse sine (arc sine) of a value, in radians.
The inverse sine (arc sine) of a value, in radians.
The inverse sine (arc sine) of a value, in radians.
The inverse sine (arc sine) of a value, in radians.
asinh¶
The inverse hyperbolic sine (hyperbolic arc sine) of a value, in radians.
The inverse hyperbolic sine (hyperbolic arc sine) of a value, in radians.
The inverse hyperbolic sine (hyperbolic arc sine) of a value, in radians.
The inverse hyperbolic sine (hyperbolic arc sine) of a value, in radians.
atan¶
The inverse tangent (arc tangent) of a value, in radians.
The inverse tangent (arc tangent) of a value, in radians.
The inverse tangent (arc tangent) of a value, in radians.
The inverse tangent (arc tangent) of a value, in radians.
atanh¶
The inverse hyperbolic tangent (hyperbolic arc tangent) of a value, in radians.
The inverse hyperbolic tangent (hyperbolic arc tangent) of a value, in radians.
The inverse hyperbolic tangent (hyperbolic arc tangent) of a value, in radians.
The inverse hyperbolic tangent (hyperbolic arc tangent) of a value, in radians.
average¶
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
ceil¶
The smallest integer greater than or equal to the specified value.
The smallest integer greater than or equal to the specified value.
The smallest integer greater than or equal to the specified value.
The smallest integer greater than or equal to the specified value.
concat¶
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
Concatenates strings together.
cond¶
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
Decides between two values depending on the evaluation of a boolean value.
cos¶
The cosine of a value that is measured in radians.
The cosine of a value that is measured in radians.
The cosine of a value that is measured in radians.
The cosine of a value that is measured in radians.
cosh¶
The hyperbolic cosine of a value that is measured in radians.
The hyperbolic cosine of a value that is measured in radians.
The hyperbolic cosine of a value that is measured in radians.
The hyperbolic cosine of a value that is measured in radians.
div¶
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Divides one aggregation value by another.
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to child as a nested field of the current field.
Refers to child as a nested field of the current field.
Refers to child as a nested field of the current field.
eq¶
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
Compares two aggregation values and returns true if they are equivalent.
filter¶
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
Selects a subset of an array to return based on the specified predicate, similarly to Kotlin'sfilter``.
floor¶
The largest integer less than or equal to the specified value.
The largest integer less than or equal to the specified value.
The largest integer less than or equal to the specified value.
The largest integer less than or equal to the specified value.
freeze¶
@LowLevelApi
abstract override fun freeze()
Makes this expression immutable.
from¶
abstract fun from(foreignPipeline: HasLookupPipelineCompatibility<ForeignDocument>)
Specifies the foreign collection to join with.
To learn more about the $lookup stage, see HasLookup.lookup.
Example
class Department(
val _id: ObjectId,
val name: String,
)
class User(
val _id: ObjectId,
val name: String,
val department: ObjectId,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
from(departments.aggregate())
on(User::department, Department::_id)
}
External resources
get¶
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
gt¶
gte¶
into¶
abstract fun into(field: Field<LocalDocument, List<ForeignDocument>>)
open fun into(field: KProperty1<LocalDocument, List<ForeignDocument>>)
Specifies in which field the result of the lookup will be stored into.
Specifying this parameter is mandatory.
To learn more about the $lookup stage, see HasLookup.lookup.
Example
class Department(
val _id: ObjectId,
val name: String,
)
class User(
val _id: ObjectId,
val name: String,
val department: ObjectId,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
from(departments.aggregate())
on(User::department, Department::_id)
}
Arrays and subdocuments
If you specify a field in a subdocument, the subdocument will be created even if no results are found. The field itself will not.
For example:
class Department(
val _id: ObjectId,
val name: String,
)
class DepartmentInfo(
val _id: ObjectId,
val department: Department? = null,
)
class User(
val _id: ObjectId,
val name: String,
val departmentInfo: DepartmentInfo? = null,
)
users.aggregate()
.lookup {
into(User::departmentInfo / DepartmentInfo::department)
from(departments.aggregate())
on(User::departmentInfo / DepartmentInfo::_id, Department::_id)
}
If no departments are found, here is a potential returned user:
Even though no results were found, "departmentInfo" is still set to an empty document. Since DepartmentInfo._id does not have a default value, this request will fail during deserialization (missing mandatory field).
External resources
- Official documentation: this method corresponds to the parameter
as.
let¶
abstract fun <T> let(value: Value<LocalDocument, T>, name: String?): Value<ForeignDocument, T>
@JvmName(name = "letByField")
open fun <T> let(value: Field<LocalDocument, T>, name: String?): Value<ForeignDocument, T>
@JvmName(name = "letByProperty")
open fun <T> let(value: KProperty1<LocalDocument, T>, name: String?): Value<ForeignDocument, T>
Creates a binding allowing to use an arbitrary value computed from the local documents within the foreign pipeline.
By default, when using a pipeline in from, each foreign pipeline computes the exact same results. Using let, we can inject an arbitrary value within any stage of the foreign pipeline to force it to return different results.
Example
class Department(
val _id: ObjectId,
val name: String,
val creationDate: Instant,
)
class User(
val _id: ObjectId,
val name: String,
val creationDate: Instant,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
val userCreationDate = let(User::creationDate)
from(
departments.aggregate()
.matchExpr { Department::creationDate gte userCreationDate }
)
}
To perform a simple equality between one local and one foreign field, see on.
External resources
Parameters
- name: The name of the generated variable. If
null, a name is generated automatically.
open fun <T> let(value: Value<LocalDocument, T>): Value<ForeignDocument, T>
@JvmName(name = "letByField")
open fun <T> let(value: Field<LocalDocument, T>): Value<ForeignDocument, T>
@JvmName(name = "letByProperty")
open fun <T> let(value: KProperty1<LocalDocument, T>): Value<ForeignDocument, T>
Creates a binding allowing to use an arbitrary value computed from the local documents within the foreign pipeline.
By default, when using a pipeline in from, each foreign pipeline computes the exact same results. Using let, we can inject an arbitrary value within any stage of the foreign pipeline to force it to return different results.
Example
class Department(
val _id: ObjectId,
val name: String,
val creationDate: Instant,
)
class User(
val _id: ObjectId,
val name: String,
val creationDate: Instant,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
val userCreationDate = let(User::creationDate)
from(
departments.aggregate()
.matchExpr { Department::creationDate gte userCreationDate }
)
}
To perform a simple equality between one local and one foreign field, see on.
External resources
lowercase¶
Converts a string to lowercase, returning the result.
Converts a string to lowercase, returning the result.
Converts a string to lowercase, returning the result.
Converts a string to lowercase, returning the result.
lt¶
lte¶
map¶
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
minus¶
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
Subtracts one aggregation value from another.
ne¶
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
Compares two aggregation values and returns true if they are not equivalent.
of¶
Refers to a Kotlin value within an aggregation value.
Refers to a field within an aggregation value.
Refers to a BsonType within an aggregation value.
Refers to a field within an aggregation value.
Refers to a Kotlin value within an aggregation value.
on¶
abstract fun <Key> on(localField: Field<LocalDocument, Key>, foreignField: Field<ForeignDocument, Key>)
open fun <Key> on(localField: Field<LocalDocument, Key>, foreignField: KProperty1<ForeignDocument, Key>)
open fun <Key> on(localField: KProperty1<LocalDocument, Key>, foreignField: Field<ForeignDocument, Key>)
open fun <Key> on(localField: KProperty1<LocalDocument, Key>, foreignField: KProperty1<ForeignDocument, Key>)
Specifies that the field foreignField in the foreign collection must have a value that is strictly equal to the value of the local field localField.
To learn more about the $lookup stage, see HasLookup.lookup.
Example
class Department(
val _id: ObjectId,
val name: String,
)
class User(
val _id: ObjectId,
val name: String,
val department: ObjectId,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
from(departments.aggregate())
on(User::department, Department::_id)
}
The on operator is semantically equivalent to a match stage using a let binding:
users.aggregate()
.lookup {
into(User::departments)
val department = let(User::department)
from(
departments.aggregate()
.matchExpr { Department::_id eq department }
)
}
External resources
onEach¶
open fun <Key> onEach(localField: Field<LocalDocument, Collection<Key>>, foreignField: Field<ForeignDocument, Key>)
open fun <Key> onEach(localField: KProperty1<LocalDocument, Collection<Key>>, foreignField: Field<ForeignDocument, Key>)
open fun <Key> onEach(localField: Field<LocalDocument, Collection<Key>>, foreignField: KProperty1<ForeignDocument, Key>)
open fun <Key> onEach(localField: KProperty1<LocalDocument, Collection<Key>>, foreignField: KProperty1<ForeignDocument, Key>)
Specifies that the field foreignField in the foreign collection must have a value that is strictly equal to one of the elements of the local array localField.
To learn more about the $lookup stage, see HasLookup.lookup.
Example
class Department(
val _id: ObjectId,
val name: String,
)
class User(
val _id: ObjectId,
val name: String,
val departmentIds: List<ObjectId>,
val departments: List<Department>,
)
users.aggregate()
.lookup {
into(User::departments)
from(departments.aggregate())
onEach(User::departmentIds, Department::_id)
}
The on operator is semantically equivalent to a match stage using a let binding:
users.aggregate()
.lookup {
into(User::departments)
val departmentIds = let(User::departmentIds)
from(
departments.aggregate()
.matchExpr { Department::_id isOneOf departmentIds }
)
}
External resources
plus¶
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
Sums two aggregation values.
replace¶
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
Replaces all instances of find with a replacement string.
replaceFirst¶
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
@JvmName(name = "replaceFirstResultReceiverByPropertyByProperty")
inline fun <Context : Any> String?.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
@JvmName(name = "replaceFirstPropertyReceiverByResultByProperty")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: String?, replacement: KProperty1<Context, String?>): Value<Context, String?>
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByResult")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: String?): Value<Context, String?>
Replaces the first instance of find with a replacement string.
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByProperty")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
Replaces the first instance of find with a replacement string.
simplify¶
@LowLevelApi
abstract fun simplify(): BsonNode?
Returns a simplified (but equivalent) expression to the current expression.
sin¶
The sine of a value that is measured in radians.
The sine of a value that is measured in radians.
The sine of a value that is measured in radians.
The sine of a value that is measured in radians.
sinh¶
The hyperbolic sine of a value that is measured in radians.
The hyperbolic sine of a value that is measured in radians.
The hyperbolic sine of a value that is measured in radians.
The hyperbolic sine of a value that is measured in radians.
sorted¶
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
sortedBy¶
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
sortedDescending¶
Sorts an array based on its elements, in descending order.
@JvmName(name = "sortedDescendingPropertyReceiver")
open fun <Context : Any, T> KProperty1<Context, Collection<T>>.sortedDescending(): Value<Context, List<T>>
Sorts an array based on its elements, in descending order.
Sorts an array based on its elements, in descending order.
Sorts an array based on its elements, in descending order.
split¶
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
Divides a string into an array of substrings based on a delimiter.
substring¶
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
substringUTF8¶
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
@JvmName(name = "substringUTF8ResultReceiverByPropertyByProperty")
inline fun <Context : Any> String?.substringUTF8(startIndex: KProperty1<Context, Int>, byteCount: KProperty1<Context, Int>): Value<Context, String?>
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
@JvmName(name = "substringUTF8PropertyReceiverByResultByProperty")
inline fun <Context : Any> KProperty1<Context, String?>.substringUTF8(startIndex: Int, byteCount: KProperty1<Context, Int>): Value<Context, String?>
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
@JvmName(name = "substringUTF8PropertyReceiverByPropertyByResult")
inline fun <Context : Any> KProperty1<Context, String?>.substringUTF8(startIndex: KProperty1<Context, Int>, byteCount: Int): Value<Context, String?>
Returns the substring of a string.
@JvmName(name = "substringUTF8PropertyReceiverByPropertyByProperty")
open fun <Context : Any> KProperty1<Context, String?>.substringUTF8(startIndex: KProperty1<Context, Int>, byteCount: KProperty1<Context, Int>): Value<Context, String?>
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
Returns the substring of a string.
switch¶
Selects one value based on multiple conditions.
Selects one value based on multiple conditions.
Selects one value based on multiple conditions.
Selects one value based on multiple conditions.
take¶
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
takeLast¶
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
tan¶
The tangent of a value that is measured in radians.
The tangent of a value that is measured in radians.
The tangent of a value that is measured in radians.
The tangent of a value that is measured in radians.
tanh¶
The hyperbolic tangent of a value that is measured in radians.
The hyperbolic tangent of a value that is measured in radians.
The hyperbolic tangent of a value that is measured in radians.
The hyperbolic tangent of a value that is measured in radians.
then¶
@JvmName(name = "thenPropertyReceiverByProperty")
open infix fun <R : Any, T> KProperty1<R, Boolean>.then(value: KProperty1<R, T>): ConditionalValueOperators.Case<R, T>
times¶
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
Multiplies two or more aggregation values.
toBoolean¶
Converts this value to a BsonType.Boolean.
Converts this value to a BsonType.Boolean.
Converts this value to a BsonType.Boolean.
Converts this value to a BsonType.Boolean.
toBson¶
@LowLevelApi
open fun toBson(): BsonDocument
Writes the result of simplifying to a new BsonDocument.
toDegrees¶
Converts an angle in radians to an angle in degrees.
Converts an angle in radians to an angle in degrees.
Converts an angle in radians to an angle in degrees.
Converts an angle in radians to an angle in degrees.
toDouble¶
Converts this value to a BsonType.Double.
Converts this value to a BsonType.Double.
Converts this value to a BsonType.Double.
Converts this value to a BsonType.Double.
toInstant¶
Converts this value to an Instant (BsonType.Datetime).
Converts this value to an Instant (BsonType.Datetime).
Converts this value to an Instant (BsonType.Datetime).
Converts this value to an Instant (BsonType.Datetime).
toInt¶
Converts this value to an Int (BsonType.Int32).
Converts this value to an Int (BsonType.Int32).
Converts this value to an Int (BsonType.Int32).
Converts this value to an Int (BsonType.Int32).
toLong¶
Converts this value to an Long (BsonType.Int64).
Converts this value to an Long (BsonType.Int64).
Converts this value to an Long (BsonType.Int64).
Converts this value to an Long (BsonType.Int64).
toObjectId¶
Converts this value to an ObjectId.
@JvmName(name = "toObjectIdPropertyReceiver")
open fun <R : Any> KProperty1<R, *>.toObjectId(): Value<R, ObjectId>
Converts this value to an ObjectId.
Converts this value to an ObjectId.
toRadians¶
Converts an angle in degrees to an angle in radians.
Converts an angle in degrees to an angle in radians.
Converts an angle in degrees to an angle in radians.
Converts an angle in degrees to an angle in radians.
toString¶
toText¶
Converts this value to a String.
Converts this value to a String.
Converts this value to a String.
toUuid¶
Converts a string value to a Uuid (BsonType.BinaryData).
@JvmName(name = "toUuidPropertyReceiver")
@ExperimentalUuidApi
open fun <R : Any> KProperty1<R, *>.toUuid(): Value<R, Uuid>
Converts a string value to a Uuid (BsonType.BinaryData).
Converts a string value to a Uuid (BsonType.BinaryData).
Converts a string value to a Uuid (BsonType.BinaryData).
trim¶
Removes whitespace characters, including null, or the specified characters from the beginning and end of a string.
Removes whitespace characters, including null, or the specified characters from the beginning and end of a string.
Removes whitespace characters, including null, or the specified characters from the beginning and end of a string.
Removes whitespace characters, including null, or the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
Removes the specified characters from the beginning and end of a string.
trimEnd¶
Removes whitespace characters, including null, or the specified characters from the end of a string.
Removes whitespace characters, including null, or the specified characters from the end of a string.
Removes whitespace characters, including null, or the specified characters from the end of a string.
Removes whitespace characters, including null, or the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
Removes the specified characters from the end of a string.
trimStart¶
Removes whitespace characters, including null, or the specified characters from the beginning of a string.
Removes whitespace characters, including null, or the specified characters from the beginning of a string.
Removes whitespace characters, including null, or the specified characters from the beginning of a string.
Removes whitespace characters, including null, or the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
Removes the specified characters from the beginning of a string.
unsafe¶
Refers to a field child of the current field, with no compile-time safety.
open infix fun <Root, Child> KProperty1<Root, *>.unsafe(child: KProperty1<*, Child>): Field<Root, Child>
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, with no compile-time safety.
uppercase¶
Converts a string to uppercase, returning the result.
Converts a string to uppercase, returning the result.
Converts a string to uppercase, returning the result.
Converts a string to uppercase, returning the result.
writeTo¶
@LowLevelApi
abstract override fun writeTo(writer: BsonFieldWriter)
Writes the result of simplifying this expression into writer.