collection
abstract override fun <Document : Any> collection(name: String, type: KType): MultiplatformMongoCollection<Document>(source)
Creates a MultiplatformMongoCollection object.
This method is purely a client-side operation, it does nothing in the MongoDB server. In MongoDB, databases and collections are created implicitly on the first insert.
For an example, see MultiplatformMongoClient.
Prefer using the overload that doesn't have a type argument. If type is specified, it must match Document. Otherwise, the behavior is unspecified.
inline fun <Document : Any> collection(name: String): MultiplatformMongoCollection<Document>(source)
Creates a MultiplatformMongoCollection object.
This method is purely a client-side operation, it does nothing in the MongoDB server. In MongoDB, databases and collections are created implicitly on the first insert.
For an example, see MultiplatformMongoClient.