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)
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()
Content copied to clipboard
External resources
open infix fun <Context : Any> Value<Context, String?>.concat(other: Value<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 (of(Document::firstName) concat of(" ") concat of(Document::lastName))
}
.toList()
Content copied to clipboard