Popularity
2.2
Declining
Activity
5.9
Declining
25
2
0

Programming language: Kotlin
Tags: Database    
Latest version: v1.1.2

fluid-mongo alternatives and similar libraries

Based on the "Database" category

Do you think we are missing an alternative of fluid-mongo or a related project?

Add another 'Database' Library

README

fluid-mongo

Maven Central JCenter Kotlin MongoDB #fluid-libraries Slack Channel

Kotlin coroutine support for MongoDB built on top of the official MongoDB Reactive Streams Java Driver.

Installation

build.gradle.kts:

dependencies {
    implementation("io.fluidsonic.mongo:fluid-mongo:1.1.2")
}

Example

import io.fluidsonic.mongo.MongoClients
import org.bson.Document


suspend fun main() {
    val collection = MongoClients.create()
        .getDatabase("test")
        .getCollection("test")

    collection.insertOne(Document("hello", "world"))    // suspending call
    collection.insertOne(Document("it's", "so easy!"))  // suspending call

    collection.find().collect { document ->  // Kotlin Flow
        println(document)
    }
}

Output:

Document{{_id=5bb6b56f9cfa62686b5afc87, hello=world}}
Document{{_id=5bb6b56f9cfa62686b5afc88, it's=so easy!}}

License

Apache 2.0


Awesome Kotlin


*Note that all licence references and agreements mentioned in the fluid-mongo README section above are relevant to that project's source code only.