Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,34 @@ case class SyncMongoCollection[T](wrapped: MongoCollection[T]) extends JMongoCol
override def drop(clientSession: ClientSession, dropCollectionOptions: DropCollectionOptions): Unit =
wrapped.drop(unwrap(clientSession), dropCollectionOptions).toFuture().get()

override def createSearchIndex(indexName: String, definition: Bson) =
wrapped.createSearchIndex(indexName, definition).toFuture().get()

override def createSearchIndex(definition: Bson) =
wrapped.createSearchIndex(definition).toFuture().get()

override def createSearchIndexes(searchIndexModels: java.util.List[SearchIndexModel]) =
wrapped.createSearchIndexes(searchIndexModels.asScala.toList).toFuture().get().asJava

def updateSearchIndex(indexName: String, definition: Bson) =
wrapped.updateSearchIndex(indexName, definition).toFuture().get()

def dropSearchIndex(indexName: String) = wrapped.dropSearchIndex(indexName).toFuture().get()

override def listSearchIndexes() = SyncListSearchIndexesIterable(
wrapped
.listSearchIndexes()
)

override def listSearchIndexes[TResult](resultClass: Class[TResult]) =
SyncListSearchIndexesIterable[TResult](
wrapped
.listSearchIndexes[TResult]()(
DefaultsTo.overrideDefault[TResult, org.mongodb.scala.Document],
ClassTag(resultClass)
)
)

override def createIndex(keys: Bson): String = wrapped.createIndex(keys).toFuture().get()

override def createIndex(keys: Bson, indexOptions: IndexOptions) =
Expand Down