public class ReactiveStreamsMongoCollectionsKt
@NotNull
public static <T> io.reactivex.Single<java.lang.Long> countDocuments(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$countDocuments)
Counts the number of documents
@NotNull
public static <T> io.reactivex.Single<java.lang.Long> countDocuments(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$countDocuments,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession)
Counts the number of documents
clientSession - the client session@NotNull
public static <T> io.reactivex.Single<java.lang.Long> countDocuments(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$countDocuments,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.CountOptions options)
Counts the number of documents in the collection according to the given options.
filter - the query filter@NotNull
public static <T> io.reactivex.Single<java.lang.Long> countDocuments(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$countDocuments,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.CountOptions options)
Counts the number of documents in the collection according to the given options.
clientSession - the client sessionfilter - the query filter@NotNull
public static <T> com.mongodb.reactivestreams.client.FindPublisher<T> find(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$find,
@NotNull
java.lang.String filter)
Finds all documents that match the filter in the collection.
filter - the query filter@NotNull
public static <T> com.mongodb.reactivestreams.client.FindPublisher<T> find(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$find,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter)
Finds all documents that match the filter in the collection.
clientSession - the client sessionfilter - the query filter@NotNull
public static <T> com.mongodb.reactivestreams.client.FindPublisher<T> find(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$find,
@NotNull
org.bson.conversions.Bson... filters)
Finds all documents that match the filters in the collection.
filters - the query filter@NotNull
public static <T> com.mongodb.reactivestreams.client.FindPublisher<T> find(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$find,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson... filters)
Finds all documents that match the filters in the collection.
clientSession - the client sessionfilters - the query filter@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
java.lang.String filter)
Finds the first document that match the filter in the collection.
filter - the query filter@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter)
Finds the first document that match the filter in the collection.
clientSession - the client sessionfilter - the query filter@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
org.bson.conversions.Bson filter)
Finds the first document that match the filter in the collection.
filter - the query filter@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson filter)
Finds the first document that match the filter in the collection.
clientSession - the client sessionfilter - the query filter@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
org.bson.conversions.Bson... filters)
Finds the first document that match the filters in the collection.
filters - the query filters@NotNull
public static <T> io.reactivex.Maybe<T> findOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson... filters)
Finds the first document that match the filters in the collection.
clientSession - the client sessionfilters - the query filters@NotNull
public static <T> io.reactivex.Maybe<T> findOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneById,
@NotNull
java.lang.Object id)
Finds the document that match the id parameter.
id - the object id@NotNull
public static <T> io.reactivex.Maybe<T> findOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneById,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.Object id)
Finds the document that match the id parameter.
clientSession - the client sessionid - the object id@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOne,
@NotNull
java.lang.String filter)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
filter - the query filter to apply the the delete operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
clientSession - the client sessionfilter - the query filter to apply the the delete operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOne,
@NotNull
org.bson.conversions.Bson... filters)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
filters - the query filter to apply the the delete operationcom.mongodb.MongoWriteExceptioncom.mongodb.MongoWriteConcernExceptioncom.mongodb.MongoException@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson... filters)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
clientSession - the client sessionfilters - the query filter to apply the the delete operationcom.mongodb.MongoWriteExceptioncom.mongodb.MongoWriteConcernExceptioncom.mongodb.MongoException@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOneById,
@NotNull
java.lang.Object id)
Removes at most one document from the id parameter. If no documents match, the collection is not modified.
id - the object id@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteOneById,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.Object id)
Removes at most one document from the id parameter. If no documents match, the collection is not modified.
clientSession - the client sessionid - the object id@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteMany,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.DeleteOptions options)
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
filter - the query filter to apply the the delete operationoptions - the options to apply to the delete operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteMany,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.DeleteOptions options)
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
clientSession - the client sessionfilter - the query filter to apply the the delete operationoptions - the options to apply to the delete operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteMany,
@NotNull
org.bson.conversions.Bson[] filters,
@NotNull
com.mongodb.client.model.DeleteOptions options)
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
filters - the query filters to apply the the delete operationoptions - the options to apply to the delete operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.DeleteResult> deleteMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$deleteMany,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson[] filters,
@NotNull
com.mongodb.client.model.DeleteOptions options)
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
clientSession - the client sessionfilters - the query filters to apply the the delete operationoptions - the options to apply to the delete operation@NotNull
public static <T> io.reactivex.Completable save(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$save,
@NotNull
T document)
Save the document.
If the document has no id field, or if the document has a null id value, insert the document.
Otherwise, call replaceOneById with upsert true.
document - the document to savereplaceOneById@NotNull
public static <T> io.reactivex.Completable save(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$save,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
T document)
Save the document.
If the document has no id field, or if the document has a null id value, insert the document.
Otherwise, call replaceOneById with upsert true.
clientSession - the client sessiondocument - the document to savereplaceOneById@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOneById,
@NotNull
java.lang.Object id,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments.
id - the object idreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOneById,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.Object id,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments.
clientSession - the client sessionid - the object idreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOne,
@NotNull
java.lang.String filter,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments.
filter - the query filter to apply to the replace operationreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments.
clientSession - the client sessionfilter - the query filter to apply to the replace operationreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOneWithoutId(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOneWithoutId,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments. The id of the provided document is not used, in order to avoid updated id error. You may have to use UpdateResult.getUpsertedId in order to retrieve the generated id.
filter - the query filter to apply to the replace operationreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> replaceOneWithoutId(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$replaceOneWithoutId,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
T replacement,
@NotNull
com.mongodb.client.model.ReplaceOptions options)
Replace a document in the collection according to the specified arguments. The id of the provided document is not used, in order to avoid updated id error. You may have to use UpdateResult.getUpsertedId in order to retrieve the generated id.
clientSession - the client sessionfilter - the query filter to apply to the replace operationreplacement - the replacement documentoptions - the options to apply to the replace operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
filter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.options - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
clientSession - the client sessionfilter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.options - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
java.lang.String filter,
@NotNull
T target,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
filter - a document describing the query filtertarget - the update object - must have an non null idoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
T target,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
clientSession - the client sessionfilter - a document describing the query filtertarget - the update object - must have an non null idoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
T target,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
filter - a document describing the query filtertarget - the update object - must have an non null idoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOne(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOne,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
T target,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
clientSession - the client sessionfilter - a document describing the query filtertarget - the update object - must have an non null idoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOneById,
@NotNull
java.lang.Object id,
@NotNull
java.lang.Object update,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
id - the object idupdate - the update objectoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateOneById(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateOneById,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.Object id,
@NotNull
java.lang.Object update,
@NotNull
com.mongodb.client.model.UpdateOptions options)
Update a single document in the collection according to the specified arguments.
clientSession - the client sessionid - the object idupdate - the update objectoptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateMany,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.UpdateOptions updateOptions)
Update all documents in the collection according to the specified arguments.
filter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateMany,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.UpdateOptions updateOptions)
Update all documents in the collection according to the specified arguments.
clientSession - the client sessionfilter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateMany,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
org.litote.kmongo.SetTo[] updates,
@NotNull
com.mongodb.client.model.UpdateOptions updateOptions)
Update all documents in the collection according to the specified arguments.
filter - a document describing the query filterupdates - a document describing the update. The update to apply must include only update operators.updateOptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<com.mongodb.client.result.UpdateResult> updateMany(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$updateMany,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson filter,
@NotNull
org.litote.kmongo.SetTo[] updates,
@NotNull
com.mongodb.client.model.UpdateOptions updateOptions)
Update all documents in the collection according to the specified arguments.
clientSession - the client sessionfilter - a document describing the query filterupdates - a document describing the update. The update to apply must include only update operators.updateOptions - the options to apply to the update operation@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndDelete(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndDelete,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.FindOneAndDeleteOptions options)
Atomically find a document and remove it.
filter - the query filter to find the document withoptions - the options to apply to the operation@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndDelete(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndDelete,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
com.mongodb.client.model.FindOneAndDeleteOptions options)
Atomically find a document and remove it.
clientSession - the client sessionfilter - the query filter to find the document withoptions - the options to apply to the operation@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndReplace(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndReplace,
@NotNull
java.lang.String filter,
T replacement,
@NotNull
com.mongodb.client.model.FindOneAndReplaceOptions options)
Atomically find a document and replace it.
filter - the query filter to apply the the replace operationreplacement - the replacement documentoptions - the options to apply to the operationreturnOriginal property, this will either be the
document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be
returned@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndReplace(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndReplace,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
T replacement,
@NotNull
com.mongodb.client.model.FindOneAndReplaceOptions options)
Atomically find a document and replace it.
clientSession - the client sessionfilter - the query filter to apply the the replace operationreplacement - the replacement documentoptions - the options to apply to the operationreturnOriginal property, this will either be the
document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be
returned@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndUpdate(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndUpdate,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.FindOneAndUpdateOptions options)
Atomically find a document and update it.
filter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.options - the options to apply to the operationreturnOriginal property, this will either be the
document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be
returned@NotNull
public static <T> io.reactivex.Maybe<T> findOneAndUpdate(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$findOneAndUpdate,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String filter,
@NotNull
java.lang.String update,
@NotNull
com.mongodb.client.model.FindOneAndUpdateOptions options)
Atomically find a document and update it.
clientSession - the client sessionfilter - a document describing the query filterupdate - a document describing the update. The update to apply must include only update operators.options - the options to apply to the operationreturnOriginal property, this will either be the
document as it was before the update or as it is after the update. If no documents matched the query filter, then null will be
returned@NotNull
public static <T> io.reactivex.Maybe<java.lang.String> createIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$createIndex,
@NotNull
java.lang.String key,
@NotNull
com.mongodb.client.model.IndexOptions options)
Creates an index. If successful, the callback will be executed with the name of the created index as the result.
key - an object describing the index key(s)options - the options for the index@NotNull
public static <T> io.reactivex.Maybe<java.lang.String> createIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$createIndex,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String key,
@NotNull
com.mongodb.client.model.IndexOptions options)
Creates an index. If successful, the callback will be executed with the name of the created index as the result.
clientSession - the client sessionkey - an object describing the index key(s)options - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
java.lang.String keys,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
indexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
java.lang.String keys,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
clientSession - the client sessionindexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
org.bson.conversions.Bson keys,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
keys - an object describing the index key(s)indexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
org.bson.conversions.Bson keys,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
clientSession - the client sessionkeys - an object describing the index key(s)indexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
kotlin.reflect.KProperty[] properties,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
properties - the properties, which must contain at least oneindexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureIndex,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
kotlin.reflect.KProperty[] properties,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
clientSession - the client sessionproperties - the properties, which must contain at least oneindexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureUniqueIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureUniqueIndex,
@NotNull
kotlin.reflect.KProperty[] properties,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an IndexOptions.unique index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
properties - the properties, which must contain at least oneindexOptions - the options for the index@NotNull
public static <T> io.reactivex.Completable ensureUniqueIndex(@NotNull
com.mongodb.reactivestreams.client.MongoCollection<T> $this$ensureUniqueIndex,
@NotNull
com.mongodb.reactivestreams.client.ClientSession clientSession,
@NotNull
kotlin.reflect.KProperty[] properties,
@NotNull
com.mongodb.client.model.IndexOptions indexOptions)
Create an IndexOptions.unique index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
clientSession - the client sessionproperties - the properties, which must contain at least oneindexOptions - the options for the index