DMS SQL Console supports two resolver versions for ApsaraDB for MongoDB. Use this reference to confirm command compatibility before writing scripts or running operations.
Usage notes
SQL Console uses the new-version resolver by default.
To switch to the previous-version resolver, click the
icon in the upper-right corner of SQL Console.Commands supported by the new-version resolver are case-sensitive.
For the full MongoDB command reference, see the MongoDB documentation.
Supported commands
In the following tables,√means the command is supported and×means it is not supported.
Collection
| Category | Command | New-version resolver | Previous-version resolver |
|---|---|---|---|
| Query | data | √ | × |
| Query | Regular expression | √ | √ |
| Query | sort | √ | √ |
| Query | skip | √ | √ |
| Query | limit | √ | √ |
| Query | eval | √ | × |
| Query | find | √ | √ |
| Query | findOne | √ | √ |
| Query | aggregate | √ | × |
| Query | count | √ | √ |
| Query | countDocuments | √ | × |
| Query | estimatedDocumentCount | √ | × |
| Query | distinct | √ | √ |
| Query | getIndexes | √ | √ |
| Query | findAndModify | √ | √ |
| Query | findOneAndDelete | √ | × |
| Query | findOneAndReplace | √ | × |
| Query | findOneAndUpdate | √ | × |
| Query | find.collation | √ | × |
| Query | getShardDistribution | × | √ |
| Query | isCapped | √ | √ |
| Query | storageSize | √ | √ |
| Query | latencyStats | √ | × |
| Query | getShardVersion | √ | × |
| Query | totalIndexSize | √ | √ |
| Query | totalSize | √ | √ |
| Data update | insert | √ | √ |
| Data update | insertOne | √ | × |
| Data update | insertMany | √ | × |
| Data update | save | √ | √ |
| Data update | findAndModify | √ | √ |
| Data update | remove | √ | √ |
| Data update | update | √ | √ |
| Data update | updateOne | √ | × |
| Data update | updateMany | √ | × |
| Data update | bulkWrite | × | × |
| Collection modification | drop | √ | √ |
| Collection modification | replaceOne | √ | × |
| Collection modification | dropIndexes | √ | × |
| Collection modification | renameCollection | √ | √ |
| Collection creation | createCollection | √ | √ |
| Index modification | createIndexes | √ | √ |
| Index modification | dropIndexes | √ | × |
| Index modification | reIndex | √ | × |
| Others | validate | √ | √ |
Database
| Category | Command | New-version resolver | Previous-version resolver |
|---|---|---|---|
| Database query | adminCommand | √ | × |
| Database query | commandHelp | √ | √ |
| Database query | getCollectionInfos | √ | √ |
| Database query | getCollectionNames | √ | √ |
| Database query | getLogComponents | √ | √ |
| Database query | getProfilingStatus | √ | √ |
| Database query | getSiblingDB | √ | √ |
| Database query | help | √ | √ |
| Database query | hostInfo | √ | √ |
| Database query | isMaster | √ | √ |
| Database query | listCommands | √ | √ |
| Database query | serverStatus | √ | √ |
| Database query | resetError | √ | √ |
| Database query | serverBuildInfo | √ | √ |
| Database query | serverCmdLineOpts | √ | × |
| Database query | setLogLevel | √ | √ |
| Database query | setProfilingLevel | √ | √ |
| Database query | stats | √ | √ |
| Database query | version | √ | √ |
| View creation | createView | √ | × |
| High-risk commands | currentOp | √ | √ |
| High-risk commands | fsyncLock | √ | √ |
| High-risk commands | fsyncUnlock | √ | √ |
Cache query
| Category | Command | New-version resolver | Previous-version resolver |
|---|---|---|---|
| Cache query | Commands in brackets ([]) | √ | × |
| Cache query | map | √ | × |
| Cache query | forEach | √ | × |
User management
| Category | Command | New-version resolver | Previous-version resolver |
|---|---|---|---|
| Role query | getRole | √ | √ |
| Role query | getRols | √ | √ |
| Role modification | createRole | √ | √ |
| Role modification | dropRole | √ | √ |
| Role modification | dropAllRoles | √ | √ |
| Role modification | grantPrivilegesToRole | √ | √ |
| Role modification | revokePrivilegesFromRole | √ | √ |
| Role modification | revokeRolesFromRole | √ | √ |
| Role modification | updateRole | √ | √ |