vertx / io.vertx.kotlin.ext.mongo / io.vertx.ext.mongo.MongoClient / createIndexAwait

createIndexAwait

suspend fun MongoClient.createIndexAwait(collection: String, key: JsonObject): Unit

Creates an index.

Parameters

collection - the collection

key - A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.

resultHandler - will be called when complete

Return