MongoDB request DSL • opensavvy.ktmongo.dsl.aggregation.operators • StringValueOperators • concat
concat¶
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¶
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¶
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()