-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for BulkWrite in Mongo
- Loading branch information
Showing
4 changed files
with
69 additions
and
36 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
kondor-mongo/src/main/kotlin/com/ubertob/kondor/mongo/core/MongoBulkOperation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.ubertob.kondor.mongo.core | ||
|
||
import org.bson.conversions.Bson | ||
|
||
sealed class MongoBulkOperation<T : Any> { //!!! find better name but MongoOperation is already taken... MongoWrite ? | ||
|
||
data class Insert<T : Any>(val document: T) : MongoBulkOperation<T>() | ||
data class Update<T : Any>(val filter: Bson, val update: Bson) : MongoBulkOperation<T>() | ||
data class Delete<T : Any>(val filter: Bson) : MongoBulkOperation<T>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters