All Products
Search
Document Center

Data Management:Supported MongoDB commands

Last Updated:Oct 09, 2023

This topic describes the ApsaraDB for MongoDB commands that are supported by the resolver of the new and previous versions in SQL Console.

Usage notes

  • By default, SQL Console for MongoDB uses the resolver of the new version.

  • If you need to switch to the resolver of the previous version, click the return icon in the upper-right corner of SQL Console.

  • The ApsaraDB for MongoDB commands that are supported by the resolver of the new version in SQL Console are case-sensitive.

Supported commands

Note

In the following table, a tick () indicates that the command is supported, and a cross (×) indicates that the command is not supported.

Collection

Category

Command

Resolver of the new version

Resolver of the previous version

Query

data

×

Regular expression

sort

skip

limit

eval

×

find

findOne

aggregate

×

count

countDocuments

×

estimatedDocumentCount

×

distinct

getIndexes

findAndModify

findOneAndDelete

×

findOneAndReplace

×

findOneAndUpdate

×

find.collation

×

getShardDistribution

×

isCapped

storageSize

latencyStats

×

getShardVersion

×

totalIndexSize

totalSize

Data update

insert

insertOne

×

insertMany

×

save

findAndModify

remove

update

updateOne

×

updateMany

×

bulkWrite

×

Collection modification

drop

replaceOne

×

dropIndexes

×

renameCollection

Collection creation

createCollection

Index modification

createIndexes

dropIndexes

×

reIndex

×

Others

validate

Database

Category

Command

Resolver of the new version

Resolver of the previous version

Database query

adminCommand

×

commandHelp

getCollectionInfos

getCollectionNames

getLogComponents

getProfilingStatus

getSiblingDB

help

hostInfo

isMaster

listCommands

serverStatus

resetError

serverBuildInfo

serverCmdLineOpts

×

setLogLevel

setProfilingLevel

stats

version

View creation

createView

×

High-risk commands

currentOp

fsyncLock

fsyncUnlock

Cache query

Category

Command

Resolver of the new version

Resolver of the previous version

Cache query

Commands in brackets ([])

×

map

×

forEach

×

User management

Category

Command

Resolver of the new version

Resolver of the previous version

Role query

getRole

getRols

Role modification

createRole

dropRole

dropAllRoles

grantPrivilegesToRole

revokePrivilegesFromRole

revokeRolesFromRole

updateRole