MongoCollection
A mongo collection provides access to retrieve and update data from the database's collection with specific typed serialization.
This API corresponds to the Atlas App Service "MongoDB API". Please consult the MongoDB API Reference for a detailed description of methods and arguments.
Input arguments and responses to the App Service HTTP requests will be serialized from and to the type T using Kotlin's Serialization framework and can be customized by Serializable-annotations or customizing the EJson-serializer passed to the various MongoClient, MongoDatabase and MongoCollection-factory methods. For details on configuring the serialization see MongoClient.
All operations on a MongoCollection will throw an:
ServiceException if the underlying App Service HTTP requests fails
SerializationException if input arguments cannot be serialized to a valid EJson document or if the App Service response could not be deserialized to the return types.
Parameters
the default type that remote entities of the collection will be serialized from and to.
Functions
Returns the number of documents in the collection.
Delete multiple objects from the remote collection.
Delete a single object from the remote collection.
Find and delete a single object in the remote collection.
Find and replace or insert a single new object in the remote collection.
Find and update or insert a single new object in the remote collection.
Insert a list of object into the remote collection.
Update multiple objects or insert a single new object in the remote collection.
Update or insert a single object in the remote collection.
Get an instance of the same collection with a different set of default types serialization.