KtMongo¶
object KtMongo
Entry-point to convert objects from the official drivers to the KtMongo library.
To learn more about the syntax of the different operators, see the top-level functions in this package.
Functions¶
from¶
@JvmStatic
@JvmOverloads
fun <T : Any> from(
driver: MongoCollection<T>,
documentType: KType,
nameStrategy: PropertyNameStrategy = PropertyNameStrategy.Default
): JvmMongoCollection<T>
Converts a Java MongoDB collection into a KtMongo collection.
Example (Java)
@JvmStatic
@JvmOverloads
fun <T : Any> from(
driver: MongoCollection<T>,
documentType: KType,
nameStrategy: PropertyNameStrategy = PropertyNameStrategy.Default
): JvmMongoCollection<T>
Converts a Kotlin MongoDB collection into a KtMongo collection.
Example (Kotlin)