Indexes

object Indexes

Indexes extension methods to improve Kotlin interop

Since

5.3

Functions

Link copied to clipboard
fun ascending(vararg properties: KProperty<*>): Bson
fun ascending(properties: Iterable<KProperty<*>>): Bson

Create an index key for an ascending index on the given fields.

Link copied to clipboard
fun descending(vararg properties: KProperty<*>): Bson
fun descending(properties: Iterable<KProperty<*>>): Bson

Create an index key for a descending index on the given fields.

Link copied to clipboard
fun <T> geo2d(property: KProperty<T>): Bson

Create an index key for a 2d index on the given field.

Link copied to clipboard
fun geo2dsphere(vararg properties: KProperty<*>): Bson
fun geo2dsphere(properties: Iterable<KProperty<*>>): Bson

Create an index key for an 2dsphere index on the given fields.

Link copied to clipboard
fun <T> hashed(property: KProperty<T>): Bson

Create an index key for a hashed index on the given property.

Link copied to clipboard
fun <T> text(property: KProperty<T>): Bson

Create an index key for a text index on the given property.