Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.aggregation.operatorsStringValueOperators

StringValueOperators

String aggregation operators.

External resources

Inheritors

Properties

context

abstract val context: 

field

Converts a Kotlin property into a Field.

length

Returns the number of code points in the specified string.

lengthUTF8

Returns the number of UTF-8 encoded bytes in the specified string.

Functions

div

open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: KProperty1<Root, Child>): Value<Context, Child>

Refers to field as a nested field of the current value.

open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: Field<Root, Child>): Value<Context, Child>

Refers to field as a nested field of the current value.

open operator fun <Root, Parent, Child> KProperty1<Root, Parent>.div(child: KProperty1<Parent & Any, Child>): Field<Root, Child>

Refers to child as a nested field of the current field.

get

open operator fun <Root, Type> KProperty1<Root, Collection<Type>>.get(index: Int): Field<Root, Type>

Refers to a specific item in an array, by its index.

open operator fun <Root, Type> KProperty1<Root, Map<String, Type>>.get(index: String): Field<Root, Type>

Refers to a specific item in a map, by its name.

lowercase

Converts a string to lowercase, returning the result.

of

open fun <Result> of(value: Result): Value<Any, Result>

Refers to a Kotlin value within an aggregation value.

open fun of(value: ): Value<Any, >

Refers to a BsonType within an aggregation value.

Refers to a field within an aggregation value.

open fun <Context : Any, Result> of(field: Field<Context, Result>): Value<Context, Result>

Refers to a field within an aggregation value.

replace

open fun <Context : Any> Value<Context, String?>.replace(find: String, replacement: String): Value<Context, String?>

Replaces all instances of find with a replacement string.

open fun <Context : Any> Value<Context, String?>.replace(find: Value<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>

Replaces all instances of find with a replacement string.

replaceFirst

open fun <Context : Any> Value<Context, String?>.replaceFirst(find: String, replacement: String): Value<Context, String?>

Replaces the first instance of find with a replacement string.

open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>

Replaces the first instance of find with a replacement string.

split

open fun <Context : Any> Value<Context, String>.split(delimiter: String): Value<Context, List<String>?>

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.

open fun <Context : Any> Value<Context, String?>.substring(startIndex: Value<Context, Int>, length: Value<Context, Int>): Value<Context, String?>

Returns the substring of a string.

substringUTF8

Returns the substring of a string.

open fun <Context : Any> Value<Context, String?>.substringUTF8(startIndex: Value<Context, Int>, byteCount: Value<Context, Int>): Value<Context, String?>

Returns the substring of a string.

trim

Removes whitespace characters, including null, or the specified characters from the beginning and end of a string.

open fun <Context : Any> Value<Context, String?>.trim(vararg characters: Char): Value<Context, String?>

Removes the specified characters from the beginning and end of a string.

open fun <Context : Any> Value<Context, String?>.trim(characters: Value<Context, String?>): Value<Context, 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.

open fun <Context : Any> Value<Context, String?>.trimEnd(vararg characters: Char): Value<Context, String?>

Removes the specified characters from the end of a string.

open fun <Context : Any> Value<Context, String?>.trimEnd(characters: Value<Context, String?>): Value<Context, 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.

open fun <Context : Any> Value<Context, String?>.trimStart(vararg characters: Char): Value<Context, String?>

Removes the specified characters from the beginning of a string.

open fun <Context : Any> Value<Context, String?>.trimStart(characters: Value<Context, String?>): Value<Context, String?>

Removes the specified characters from the beginning of a string.

uppercase

Converts a string to uppercase, returning the result.