Skip to content

opensavvy.ktmongo.coroutines

Types

CoroutineMongoAggregateIterable

Streaming-capable iterable cursor to read data from the database.

CoroutineMongoAggregationPipeline

An aggregation pipeline built on top of the official Kotlin driver.

CoroutineMongoClient

Entry-point to the KtMongo Coroutines driver.

CoroutineMongoCollection

A collection stores related documents together.

CoroutineMongoDatabase

A grouping of collections with the same theme.

CoroutineMongoFindIterable

Streaming-capable iterable cursor to read data from the database.

Functions

asKtMongo

Instantiates a KtMongo CoroutineMongoAggregateIterable using an existing flow from the official Kotlin driver.

Instantiates a KtMongo CoroutineMongoFindIterable using an existing flow from the official Kotlin driver.

fun MongoClient.asKtMongo(): CoroutineMongoClient

Instantiates a KtMongo CoroutineMongoClient using an existing client from the official Kotlin driver.

fun MongoDatabase.asKtMongo(): CoroutineMongoDatabase

Instantiates a KtMongo CoroutineMongoDatabase using an existing client from the official Kotlin driver.

inline fun <Document : Any> MongoCollection<Document>.asKtMongo(
    factory: BsonFactory = BsonFactory(this.codecRegistry), 
    propertyNameStrategy: PropertyNameStrategy = PropertyNameStrategy.Default, 
    objectIdGenerator: ObjectIdGenerator = ObjectIdGenerator.Jvm()
): CoroutineMongoCollection<Document>

Instantiates a KtMongo CoroutineMongoCollection using an existing collection from the official Kotlin driver.

fun <Document : Any> MongoCollection<Document>.asKtMongo(
    factory: BsonFactory = BsonFactory(this.codecRegistry), 
    propertyNameStrategy: PropertyNameStrategy = PropertyNameStrategy.Default, 
    objectIdGenerator: ObjectIdGenerator = ObjectIdGenerator.Jvm(), 
    type: KType
): CoroutineMongoCollection<Document>

Instantiates a KtMongo CoroutineMongoCollection using an existing collection from the official Kotlin driver.