全部產品
Search
文件中心

ApsaraDB for MongoDB:ApsaraDB for MongoDB支援及限制哪些命令?

更新時間:Feb 28, 2024

MongoDB官方命令請參見MongoDB官方命令表

ApsaraDB for MongoDB支援及限制命令如下表所示。

命令類型支援不支援
Aggregation Commands
  • aggregate
  • distinct
  • count
  • mapReduce
group
說明 從MongoDB 3.4版本開始不支援。
Geospatial Commands
  • geoNear
  • geoSearch
Query and Write Operation Commands
  • insert
  • update
  • delete
  • findAndModify
  • getLastError
  • getPrevError
  • resetError
  • parallelCollectionScan
eval
說明 從MongoDB 3.0版本開始不支援,MongoDB 4.2版本刪除該命令。
Query Plan Cache Commands
  • planCacheListFilters
  • planCacheSetFilter
  • planCacheClearFilters
  • planCacheListQueryShapes
  • planCacheListPlans
  • planCacheClear
Authentication
  • logout
  • authenticate
  • authSchemaUpgrade
  • copydbgetnonce
  • getnonce
    說明 從MongoDB 4.0版本開始不支援該命令。
User Management Commands
  • createUser
  • updateUser
  • dropUser
  • dropAllUsersFromDatabase
  • grantRolesToUser
  • revokeRolesFromUser
  • usersInfo
Role Management Commands
  • createRole
  • updateRole
  • dropRole
  • dropAllRolesFromDatabase
  • grantPrivilegesToRole
  • revokePrivilegesFromRole
  • grantRolesToRole
  • revokeRolesFromRole
  • rolesInfo
  • invalidateUserCache
Diagnostic Commands
  • explain
  • listDatabases
  • dbHash
  • listCommands
  • availableQueryOptions
  • buildInfo
  • collStats
  • dbStats
  • cursorInfo
  • dataSize
  • ping
  • profile
  • top
  • whatsmyuri
  • serverStatus
  • features
  • isSelf
  • validate
  • netstat
  • hostInfo
    說明 從mongodb_20190725_1.1.8版本開始支援,mongodb_20190409_1.1.7及之前版本不支援該命令。
  • currentConn

    阿里雲ApsaraDB for MongoDB自主研發命令,該命令支援查看執行個體當前的串連情況。使用樣本:db.adminCommand({currentConn:1})

  • driverOIDTest
  • connPoolStats
  • shardConnPoolStats
  • getCmdLineOpts
  • diagLogging
Instance Administration Commands
  • renameCollection
  • dropDatabase
  • listCollections
  • drop
  • create
  • cloneCollectionAsCapped
  • convertToCapped
  • filemd5
  • createIndexes
  • listIndexes
  • dropIndexes
  • fsync
  • connectionStatus
  • collMod
  • reIndex
  • touch
  • getParameter
  • compact
  • copydb
  • clone
  • clean
  • shutdown
  • logRotate
  • repairDatabase
  • repairCursor
  • setParameter
  • connPoolSync
  • cloneCollection
Replication Commands
  • isMaster
  • applyOps
  • replSetInitiate
  • replSetFreeze
  • replSetMaintenance
  • replSetGetConfig
  • replSetRequestVotes
  • replSetReconfig
  • replSetStepDown
  • replSetSyncFrom
  • replSetElect
  • replSetUpdatePosition
  • resync
  • appendOplogNote
Sharding Commands-
  • addShard
  • removeShard
  • getShardVersion
  • setShardVersion
  • unsetSharding
  • checkShardingIndex