@@ -255,19 +255,17 @@ extension MongoCollection {
255255 * - options: Optional `DropIndexOptions` to use for the command
256256 * - session: Optional `ClientSession` to use when executing this command
257257 *
258- * - Returns: An `EventLoopFuture` containing the result of dropping the index.
259- *
260- * - Throws:
261- * - `WriteError` if an error occurs while performing the command.
262- * - `CommandError` if an error occurs that prevents the command from executing.
263- * - `InvalidArgumentError` if the options passed in form an invalid combination.
264- * - `EncodingError` if an error occurs while encoding the options.
258+ * - Returns: An `EventLoopFuture<Void>`. On failure, contains:
259+ * - `WriteError` if an error occurs while performing the command.
260+ * - `CommandError` if an error occurs that prevents the command from executing.
261+ * - `InvalidArgumentError` if the options passed in form an invalid combination.
262+ * - `EncodingError` if an error occurs while encoding the options.
265263 */
266264 public func dropIndex(
267265 _ name: String ,
268266 options: DropIndexOptions ? = nil ,
269267 session: ClientSession ? = nil
270- ) -> EventLoopFuture < DropIndexesResult > {
268+ ) -> EventLoopFuture < Void > {
271269 guard name != " * " else {
272270 return self . _client. operationExecutor. makeFailedFuture ( InvalidArgumentError (
273271 message: " Invalid index name '*'; use dropIndexes() to drop all indexes "
@@ -284,20 +282,18 @@ extension MongoCollection {
284282 * - options: Optional `DropIndexOptions` to use for the command
285283 * - session: Optional `ClientSession` to use when executing this command
286284 *
287- * - Returns: An `EventLoopFuture` containing the result of dropping the index.
288- *
289- * - Throws:
290- * - `WriteError` if an error occurs while performing the command.
291- * - `CommandError` if an error occurs that prevents the command from executing.
292- * - `InvalidArgumentError` if the options passed in form an invalid combination.
293- * - `LogicError` if the provided session is inactive.
294- * - `EncodingError` if an error occurs while encoding the options.
285+ * - Returns: An `EventLoopFuture<Void>`. On failure, contains:
286+ * - `WriteError` if an error occurs while performing the command.
287+ * - `CommandError` if an error occurs that prevents the command from executing.
288+ * - `InvalidArgumentError` if the options passed in form an invalid combination.
289+ * - `LogicError` if the provided session is inactive.
290+ * - `EncodingError` if an error occurs while encoding the options.
295291 */
296292 public func dropIndex(
297293 _ keys: Document ,
298294 options: DropIndexOptions ? = nil ,
299295 session: ClientSession ? = nil
300- ) -> EventLoopFuture < DropIndexesResult > {
296+ ) -> EventLoopFuture < Void > {
301297 return self . _dropIndexes ( index: . document( keys) , options: options, session: session)
302298 }
303299
@@ -309,20 +305,18 @@ extension MongoCollection {
309305 * - options: Optional `DropIndexOptions` to use for the command
310306 * - session: Optional `ClientSession` to use when executing this command
311307 *
312- * - Returns: An `EventLoopFuture` containing the result of dropping the index.
313- *
314- * - Throws:
315- * - `WriteError` if an error occurs while performing the command.
316- * - `CommandError` if an error occurs that prevents the command from executing.
317- * - `InvalidArgumentError` if the options passed in form an invalid combination.
318- * - `LogicError` if the provided session is inactive.
319- * - `EncodingError` if an error occurs while encoding the options.
308+ * - Returns: An `EventLoopFuture<Void>`. On failure, contains:
309+ * - `WriteError` if an error occurs while performing the command.
310+ * - `CommandError` if an error occurs that prevents the command from executing.
311+ * - `InvalidArgumentError` if the options passed in form an invalid combination.
312+ * - `LogicError` if the provided session is inactive.
313+ * - `EncodingError` if an error occurs while encoding the options.
320314 */
321315 public func dropIndex(
322316 _ model: IndexModel ,
323317 options: DropIndexOptions ? = nil ,
324318 session: ClientSession ? = nil
325- ) -> EventLoopFuture < DropIndexesResult > {
319+ ) -> EventLoopFuture < Void > {
326320 return self . _dropIndexes ( index: . document( model. keys) , options: options, session: session)
327321 }
328322
@@ -333,19 +327,17 @@ extension MongoCollection {
333327 * - options: Optional `DropIndexOptions` to use for the command
334328 * - session: Optional `ClientSession` to use when executing this command
335329 *
336- * - Returns: An `EventLoopFuture` containing the result of dropping the indexes.
337- *
338- * - Throws:
339- * - `WriteError` if an error occurs while performing the command.
340- * - `CommandError` if an error occurs that prevents the command from executing.
341- * - `InvalidArgumentError` if the options passed in form an invalid combination.
342- * - `LogicError` if the provided session is inactive.
343- * - `EncodingError` if an error occurs while encoding the options.
330+ * - Returns: An `EventLoopFuture<Void>`. On failure, contains:
331+ * - `WriteError` if an error occurs while performing the command.
332+ * - `CommandError` if an error occurs that prevents the command from executing.
333+ * - `InvalidArgumentError` if the options passed in form an invalid combination.
334+ * - `LogicError` if the provided session is inactive.
335+ * - `EncodingError` if an error occurs while encoding the options.
344336 */
345337 public func dropIndexes(
346338 options: DropIndexOptions ? = nil ,
347339 session: ClientSession ? = nil
348- ) -> EventLoopFuture < DropIndexesResult > {
340+ ) -> EventLoopFuture < Void > {
349341 return self . _dropIndexes ( index: " * " , options: options, session: session)
350342 }
351343
@@ -355,7 +347,7 @@ extension MongoCollection {
355347 index: BSON ,
356348 options: DropIndexOptions ? ,
357349 session: ClientSession ?
358- ) -> EventLoopFuture < DropIndexesResult > {
350+ ) -> EventLoopFuture < Void > {
359351 let operation = DropIndexesOperation ( collection: self , index: index, options: options)
360352 return self . _client. operationExecutor. execute ( operation, client: self . _client, session: session)
361353 }
0 commit comments