kmongo / org.litote.kmongo / kotlin.reflect.KProperty1

Extensions for kotlin.reflect.KProperty1

allPosOp

The all positional operator $[]

val <T> KProperty1<out Any?, Iterable<T>?>.allPosOp: KPropertyPath<out Any?, T?>

colProperty

Returns a collection property.

val <T> KProperty1<out Any?, Iterable<T>?>.colProperty: KCollectionSimplePropertyPath<out Any?, T>

div

Returns a composed property. For example Friend.address / Address.postalCode = "address.postalCode".

operator fun <T0, T1, T2> KProperty1<T0, T1?>.div(p2: KProperty1<T1, T2?>): KProperty1<T0, T2?>

Returns a collection composed property. For example Friend.addresses / Address.postalCode = "addresses.postalCode".

operator fun <T0, T1, T2> KProperty1<T0, Iterable<T1>?>.div(p2: KProperty1<out T1, T2?>): KProperty1<T0, T2?>

Returns a map composed property. For example Friend.addresses / Address.postalCode = "addresses.postalCode".

operator fun <T0, K, T1, T2> KProperty1<T0, Map<out K, T1>?>.div(p2: KProperty1<out T1, T2?>): KProperty1<T0, T2?>

filteredPosOp

The filtered positional operator $

fun <T> KProperty1<out Any?, Iterable<T>?>.filteredPosOp(identifier: String): KPropertyPath<out Any?, T?>

keyProjection

Key projection of map. Sample: p.keyProjection(Locale.ENGLISH) / Gift::amount

fun <K, T> KProperty1<out Any?, Map<out K, T>?>.keyProjection(key: K): KPropertyPath<Any?, T?>

mapProperty

Returns a map property.

val <K, T> KProperty1<out Any?, Map<out K, T>?>.mapProperty: KMapSimplePropertyPath<out Any?, K, T>

pos

In order to write array indexed expressions (like accesses.0.timestamp).

fun <T> KProperty1<out Any?, Iterable<T>?>.pos(position: Int): KPropertyPath<out Any?, T?>

posOp

The positional array operator $ (projection or update)

val <T> KProperty1<out Any?, Iterable<T>?>.posOp: KPropertyPath<out Any?, T?>

projectionWith

In order to write $p.p2

infix fun <T0, T1> KProperty1<T0, T1?>.projectionWith(p2: String): String

rem

Returns a composed property without type checks. For example Friend.address % Address.postalCode = "address.postalCode".

operator fun <T0, T1, T2> KProperty1<T0, T1?>.rem(p2: KProperty1<out T1, T2?>): KProperty1<T0, T2?>