This topic describes the ApsaraDB for MongoDB commands supported by the new version of the resolver in the SQL Console.

Usage notes

  • By default, the SQL Console for MongoDB shows the new version of the resolver.
  • If you need to switch to the previous version of the resolver, click the return icon in the upper-right corner of the SQL Console.
  • For the ApsaraDB for MongoDB commands supported by the previous version of the resolver, submit a ticket.
  • The ApsaraDB for MongoDB commands supported by the new version of the resolver in the SQL Console are not case-sensitive.

Supported commands

Category Command
Collection
  • Query

    data, regex, sort, skip, limit, eval, aggregate, find, findOne, count, countDocuments, estimatedDocumentCount, distinct, findAndModify, findOneAndDelete, findOneAndReplace, findOneAndUpdate, find.collation, getIndexes, getShardDistribution, isCapped, stats, storageSize, totalIndexSize, totalSize, latencyStats, and getShardVersion

  • Data update

    insert, insertOne, insertMany, save, findAndModify, remove, update, updateOne, updateMany, reIndex, and bulkWrite

  • Collection modification

    drop, renameCollection, replaceOne, dropIndexes, and deleteOne

  • Index modification

    createIndex, createIndexes, dropIndexes, reIndex, and deleteMany

  • Others

    validate

Database
  • Database query

    adminCommand, commandHelp, getCollectionInfos, getCollectionNames, getLogComponents, getProfilingStatus, getSiblingDB, help, hostInfo, isMaster, listCommands, serverStatus, resetError, serverBuildInfo, serverCmdLineOpts, setLogLevel, setProfilingLevel, stats, and version

  • Collection creation

    createCollection

  • View creation

    createView

  • High risk

    currentOp, fsyncLock, and fsyncUnlock

Cache query
  • Commands in brackets [] such as db['users']find()
  • Loop traversal functions

    forEach and map