Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.aggregation.operatorsStringValueOperatorsuppercase

uppercase

Converts a string to uppercase, returning the result.

If the argument resolves to null, $toUpper returns an empty string "".

Example

class Document(
    val text: String,
)

collection.aggregate()
    .set {
        Document::text set of(Document::text).uppercase()
    }.toList()

External resources