在 Amazon DocumentDB APIs 中支持的 MongoDB,操作和數據類型 - Amazon DocumentDB

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在 Amazon DocumentDB APIs 中支持的 MongoDB,操作和數據類型

Amazon DocumentDB (與 MongoDB 相容性) 是一種快速、可擴展、高度可用且全受管的文件資料庫服務,可支援 MongoDB 工作負載。Amazon DocumentDB 與 MongoDB 3.6,4.0 和 5.0 兼容。APIs本區段列出支援的功能。如需使用 MongoDB APIs 和驅動程式的支援,請參閱 MongoDB 社群論壇。如需使用 Amazon DocumentDB 服務的支援,請聯絡適當的 AWS 支援團隊。有關 Amazon DocumentDB 和 MongoDB 之間的功能差異,請參閱。功能差異:Amazon DocumentDB 和 MongoDB

不支援 MongoDB 命令和運算子,這些命令僅供內部使用或不適用於全受管服務,且未包含在支援的功能清單中。

自推出以來,我們已新增超過 50 項額外功能,並會繼續向客戶提供他們所需的功能。如需最近推出的相關資訊,請參閱 Amazon DocumentDB 公告。

如果您希望我們建置某項功能不受支援,請將包含您的 accountID、要求的功能和使用案例的電子郵件傳送給 Amazon DocumentDB 服務團隊,讓我們知道。

資料庫指令

管理命令

Command 3.6 4.0 5.0 弹性群集

Capped Collections

cloneCollectionAs封頂

collMod

部分

部分

部分

部分

collMod: expireAfterSeconds

convertToCapped

copydb

建立

createView

createIndexes

currentOp

drop

dropDatabase

dropIndexes

filemd5

getAuditConfig

killCursors

killOp

listCollections*

listDatabases

listIndexes

reIndex

renameCollection

setAuditConfig

* 不支援篩選選項中的type金鑰。

聚合

Command 3.6 4.0 5.0 弹性群集

aggregate

count

distinct

mapReduce

身分驗證

Command 3.6 4.0 5.0 弹性群集

authenticate

登出

診斷命令

Command 3.6 4.0 5.0 弹性群集

buildInfo

collStats

connPoolStats

connectionStatus

dataSize

dbHash

dbStats

explain

解釋:executionStats

功能

hostInfo

listCommands

profiler

serverStatus

top

查詢和寫入操作

Command 3.6 4.0 5.0 弹性群集

Change streams

刪除

find

findAndModify

getLastError

getMore

getPrevError

GridFS

insert

parallelCollectionScan

resetError

update

ReplaceOne

角色管理命令

Command 3.6 4.0 5.0 弹性群集

createRole

dropAllRolesFromDatabase

dropRole

grantRolesTo角色

revokeRolesFrom角色

revokePrivilegesFrom角色

rolesInfo

updateRole

工作階段指

Command 3.6 4.0 5.0 弹性群集

abortTransaction

commitTransaction

endSessions

killAllSessions

killAllSessionsByPattern

killSessions

refreshSessions

startSession

使用者管理

Command 3.6 4.0 5.0 弹性群集

createUser

dropAllUsersFromDatabase

dropUser

grantRolesTo使用者

revokeRolesFrom使用者

updateUser

usersInfo

分片指令

Command 弹性群集

abortReshardCollection

addShard

addShardTo區域

balancerCollectionStatus

balancerStart

balancerStatus

balancerStop

checkShardingIndex

clearJumboFlag

cleanupOrphaned

cleanupReshardCollection

commitReshardCollection

enableSharding

flushRouterConfig

getShardMap

getShardVersion

ISDBGRID

listShards

medianKey

moveChunk

movePrimary

mergeChunks

refineCollectionShard鑰匙

removeShard

removeShardFrom區域

reshardCollection

setAllowMigrations

setShardVersion

shardCollection

shardingState

分割

splitVector

unsetSharding

updateZoneKey範圍

查詢和投影運算子

陣列運算子

Command 3.6 4.0 5.0 弹性群集

$all

$elemMatch

$size

位運算符

Command 3.6 4.0 5.0 彈性叢集

$bitsAllSet

$bitsAnySet

$bitsAllClear

$bitsAnyClear

註解運算子

Command 3.6 4.0 5.0 彈性叢集

$comment

比較運算子

Command 3.6 4.0 5.0 彈性叢集

$eq

$gt

$gte

$in

$lt

$lte

$ne

$nin

元素運算子

Command 3.6 4.0 5.0 彈性叢集

$exists

$type

評估查詢運算子

Command 3.6 4.0 5.0 彈性叢集

$expr

$jsonSchema

$mod

$regex

$text

$where

邏輯運算子

Command 3.6 4.0 5.0 彈性叢集

$and

$nor

$not

$or

投影運算子

Command 3.6 4.0 5.0 彈性叢集

$

$elemMatch

$meta

$slice

更新運算子

陣列運算子

Command 3.6 4.0 5.0 彈性叢集

$

$[]

$[<identifier>]

$addToSet

$pop

$pullAll

$pull

$push

位運算符

Command 3.6 4.0 5.0 彈性叢集

$bit

欄位運算子

運算子 3.6 4.0 5.0 彈性叢集

$currentDate

$inc

$max

$min

$mul

$rename

$set

$setOnInsert

$unset

更新修飾符

運算子 3.6 4.0 5.0 彈性叢集

$each

$position

$slice

$sort

Geospatial (地理空間)

幾何說明符

查詢選取器 3.6 4.0 5.0 彈性叢集

$box

$center

$centerSphere

$geometry

$maxDistance

$minDistance

$nearSphere

$polygon

$uniqueDocs

查詢選擇器

Command 3.6 4.0 5.0 彈性叢集

$geoIntersects

$geoWithin

$near

$nearSphere

$polygon

$uniqueDocs

游標方法

Command 3.6 4.0 5.0 彈性叢集

游標。 batchSize()

cursor.close()

cursor.collation()

cursor.comment()

cursor.count()

cursor.explain()

游標。 forEach()

游標。 hasNext()

cursor.hint()

是 *

游標。 isClosed()

游標。 isExhausted()

cursor.itcount()

cursor.limit()

cursor.map()

cursor.max()

游標。 maxScan()

游標。 maxTime女士 ()

cursor.min()

cursor.next()

游標。 noCursorTimeout()

游標。 objsLeftInBatch ()

cursor.pretty()

游標。 readConcern()

游標。 readPref()

游標。 returnKey()

游標。 showRecordId()

cursor.size()

cursor.skip()

cursor.sort()

cursor.tailable()

游標。 toArray()

* 索引hint運算式支援索引。例如:db.foo.find().hint({x:1})

彙總管線運算子

累加器運算式

表達式 3.6 4.0 5.0 彈性叢集

$ 累加器

-

-

$addToSet

$avg

$count

-

-

$first

$last

$max

$min

$push

$stdDevPop

$stdDevSamp

$sum

算術運算子

Command 3.6 4.0 5.0 彈性叢集

$abs

$add

$ceil

$divide

$exp

$floor

$ln

$log

$log10

$mod

$multiply

$pow

$ 一輪

-

-

$sqrt

$subtract

$trunc

陣列運算子

Command 3.6 4.0 5.0 彈性叢集

$arrayElemAt

$arrayToObject

$concatArrays

$filter

$first

-

-

$in

$indexOfArray

$isArray

$last

-

-

$objectToArray

$range

$reverseArray

$reduce

$size

$slice

$zip

布林值運算子

Command 3.6 4.0 5.0 彈性叢集

$and

$not

$or

比較運算子

Command 3.6 4.0 5.0 彈性叢集

$cmp

$eq

$gt

$gte

$lt

$lte

$ne

條件式運算子

Command 3.6 4.0 5.0 彈性叢集

$cond

$ifNull

$switch

資料類型運算子

Command 3.6 4.0 5.0 彈性叢集

$type

資料大小運算子

Command 3.6 4.0 5.0 彈性叢集

$binarySize

-

-

$bsonSize

-

-

日期運算子

Command 3.6 4.0 5.0 彈性叢集

$dateAdd

$dateDiff

-

-

$dateFromParts

$dateFromString

$dateSubtract

$dateToParts

$dateToString

$dateTrunc

-

-

$dayOfMonth

$dayOfWeek

$dayOfYear

$hour

每isoDayOf週

$isoWeek

$isoWeekYear

$millisecond

$minute

$month

$second

$week

$year

文字運算符

Command 3.6 4.0 5.0 彈性叢集

$literal

合併運算子

Command 3.6 4.0 5.0 彈性叢集

$mergeObjects

自然算子

Command 3.6 4.0 5.0 彈性叢集

$ 自然

設定運算子

Command 3.6 4.0 5.0 彈性叢集

$allElementsTrue

$anyElementTrue

$setDifference

$setEquals

$setIntersection

$setIsSubset

$setUnion

$setWindowFields

階段操作員

Command 3.6 4.0 5.0 彈性叢集

$addFields

$bucket

$bucketAuto

$collStats

$count

$currentOp

$facet

$geoNear

$graphLookup

$group

$indexStats

$limit

$listLocalSessions

$listSessions

$lookup

$match

$ 合併

-

-

$out

$planCacheStats

-

-

$project

$redact

$replaceRoot

$sample

$set

-

-

$setWindowFields

-

-

$skip

$sort

$sortByCount

$unionWith

-

-

$unset

-

-

$unwind

字串運算子

Command 3.6 4.0 5.0 彈性叢集

$concat

$indexOfBytes

indexOfCP

$ 修剪

$regexFind

-

-

$regexFindAll

-

-

$regexMatch

-

-

$replaceAll

-

-

$replaceOne

-

-

$ R 修剪

$split

$strcasecmp

$strLenBytes

strLenCP

$substr

$substrBytes

$substrCP

$toLower

$toUpper

$ 修剪

系統變數

Command 3.6 4.0 5.0 彈性叢集

$$CURRENT

$$DESCEND

$$KEEP

$$PRUNE

$$REMOVE

$$ROOT

Command 3.6 4.0 5.0 彈性叢集

$meta

$ 搜索

類型轉換運算子

Command 3.6 4.0 5.0 彈性叢集

$ 轉換

$isNumber

-

-

$toBool

$toDate

$toDecimal

$toDouble

$toInt

$toLong

$toObjectId

$toString

變數運算子

Command 3.6 4.0 5.0 彈性叢集

$let

$map

其他運算子

Command 3.6 4.0 5.0 彈性叢集

$getField

-

-

$ 兰特

-

-

$sampleRate

-

-

資料類型

Command 3.6 4.0 5.0 彈性叢集

32 位整數

64 位元整數 (長)

陣列

二進位資料

Boolean

日期

DBPointer

DBRefs

Decimal128

Double

JavaScript

JavaScript(有範圍)

MaxKey

MinKey

Null

物件

ObjectId

Regular expression (常規表達式)

字串

符號

時間戳記

未定義

索引和索引屬性

索引

Command 3.6 4.0 5.0 彈性叢集

2dsphere

2d 索引

複合索引

雜湊索引

多索引鍵索引

單一欄位索引

文字索引

索引屬性

Command 3.6 4.0 5.0 彈性叢集

背景介紹

不區分大小寫

Hidden

部分

稀疏

文字

TTL

唯一

向量