opensavvy.ktmongo.coroutines¶
Types¶
CoroutineMongoAggregateIterable¶
interface CoroutineMongoAggregateIterable<Document : Any> : MongoIterable<Document>
Streaming-capable iterable cursor to read data from the database.
CoroutineMongoAggregationPipeline¶
interface CoroutineMongoAggregationPipeline<Document : Any> : MongoAggregationPipeline<Document>
An aggregation pipeline built on top of the official Kotlin driver.
CoroutineMongoClient¶
interface CoroutineMongoClient : MongoClient
Entry-point to the KtMongo Coroutines driver.
CoroutineMongoCollection¶
interface CoroutineMongoCollection<Document : Any> : MongoCollection<Document>
A collection stores related documents together.
CoroutineMongoDatabase¶
interface CoroutineMongoDatabase : MongoDatabase
A grouping of collections with the same theme.
CoroutineMongoFindIterable¶
interface CoroutineMongoFindIterable<Document : Any> : MongoIterable<Document>
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.