CRUD & Aggregation APIs¶
On this page
You can access most of the CRUD and Aggregation functionality of MongoDB version 3.6 with the MongoDB service; however, MongoDB Realm does not support all operations available in standard tools and clients. This page lists specific MongoDB operations that are not available when you connect to MongoDB Atlas through MongoDB Realm. For a high-level overview of MongoDB feature availability in MongoDB Realm, see Service Limitations.
The following tables track operation support with the labels "User Function" and "System Function". A "User Function" is a Function run using an application user's user context only. This is the default behavior for all Functions, and in this kind of Function all rules, roles, and permissions apply to the active user. A "System Function" is a Function run without regard for rules, roles, and permissions. You can learn more about how to run a Functions as a system user in the Functions overview.
MongoDB Realm supports most query operators for queries that run in a user function. However, some evaluation operators and all geospatial and bitwise operators are only available in system functions.
Comparison Operator Availability¶
Logical Operator Availability¶
Array Operator Availability¶
Element Operator Availability¶
Evaluation Operator Availability¶
Geospatial Operator Availability¶
Bitwise Operator Availability¶
Field Update Operator Availability¶
Array Update Operator Availability¶
Array Update Operator Modifiers Availability¶
Bitwise Update Operator Availability¶
Bulk Write Operations¶
MongoDB Realm supports bulk write operations using the same API as the MongoDB Node.js driver.
Realm also provides the db.collection.bulkWrite() method for performing bulk write operations.
Ordered Bulk Write Operation Availability¶
Realm supports the following
Unordered Bulk Write Operation Availability¶
Realm supports the following
Query Option Availability¶
MongoDB Realm supports aggregation on the both the database and collection level using the following commands:
Aggregation Pipeline Stage Availability¶
MongoDB Realm does not support the following aggregation pipeline stages when you run an aggregation
pipeline in the context of an
application user. All aggregation pipeline stages are
available to the system user except for
$out route the entire aggregation operation to
the cluster's primary node. If you want to force these stages to respect your
configured cluster read preference, set the
enforceReadPref option to
Aggregation Pipeline Operator Availability¶
MongoDB Realm supports all aggregation pipeline operators when you run an aggregation pipeline in the system user context. Realm supports all pipeline operators in an application user context with the following exceptions:
MongoDB Realm does not support any database commands in the Client SDKs or Functions. You can, however, call a limited subset of database commands when when connected to a MongoDB cluster over the MongoDB Realm wire protocol.
The following database commands are partially supported over the wire protocol. Unsupported options for each command are listed below.
Realm apps cannot run commands on the
Database Command Availability¶