concat

open fun <Context : Any> concat(strings: List<Value<Context, String?>>): Value<Context, String?>(source)
open fun <Context : Any> concat(vararg strings: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatByField")
open fun <Context : Any> concat(vararg strings: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatByProperty")
open fun <Context : Any> concat(vararg strings: KProperty1<Context, String?>): Value<Context, String?>(source)

Concatenates strings together.

If any of strings are null, the concatenation returns null.

Example

class Document(
val firstName: String,
val lastName: String,
val fullName: String,
)

collection.aggregate()
.set {
Document::fullName set concat(of(Document::firstName), of(" "), of(Document::lastName))
}
.toList()

External resources


@JvmName(name = "concatByField")
open infix fun <Context : Any> Value<Context, String?>.concat(other: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatByProperty")
open infix fun <Context : Any> Value<Context, String?>.concat(other: KProperty1<Context, String?>): Value<Context, String?>(source)
infix inline fun <Context : Any> Value<Context, String?>.concat(other: String?): Value<Context, String?>(source)
@JvmName(name = "concatFieldReceiverByValue")
open infix fun <Context : Any> Field<Context, String?>.concat(other: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatFieldReceiverByField")
open infix fun <Context : Any> Field<Context, String?>.concat(other: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatFieldReceiverByProperty")
open infix fun <Context : Any> Field<Context, String?>.concat(other: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatFieldReceiverByResult")
infix inline fun <Context : Any> Field<Context, String?>.concat(other: String?): Value<Context, String?>(source)
@JvmName(name = "concatPropertyReceiverByValue")
open infix fun <Context : Any> KProperty1<Context, String?>.concat(other: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatPropertyReceiverByField")
open infix fun <Context : Any> KProperty1<Context, String?>.concat(other: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatPropertyReceiverByProperty")
open infix fun <Context : Any> KProperty1<Context, String?>.concat(other: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatPropertyReceiverByResult")
infix inline fun <Context : Any> KProperty1<Context, String?>.concat(other: String?): Value<Context, String?>(source)
@JvmName(name = "concatResultReceiverByValue")
infix inline fun <Context : Any> String?.concat(other: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatResultReceiverByField")
infix inline fun <Context : Any> String?.concat(other: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatResultReceiverByProperty")
infix inline fun <Context : Any> String?.concat(other: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "concatResultReceiverByResult")
infix inline fun String?.concat(other: String?): Value<Any, String?>(source)

Concatenates strings together.

If any of strings are null, the concatenation returns null.

Example

class Document(
val firstName: String,
val lastName: String,
val fullName: String,
)

collection.aggregate()
.set {
Document::fullName set (of(Document::firstName) concat of(" ") concat of(Document::lastName))
}
.toList()

External resources