サポートされている機能: 7.0

次の表は、Cloud Firestore でサポートされている MongoDB 7.0 の機能の概要を示しています。動作の違いについては、動作の違いをご覧ください。

クエリ演算子とプロジェクション演算子

Cloud Firestore は、次のクエリ演算子とプロジェクション演算子をサポートしています。

配列演算子

オペレーター サポート対象
$all ○
$elemMatch ○
$size ○

ビット演算子

オペレーター サポート対象
$bitsAllClear ×
$bitsAllSet ×
$bitsAnyClear ×
$bitsAnySet ×

コメント演算子

オペレーター サポート対象
$comment ×

比較演算子

オペレーター サポート対象
$eq ○
$gt ○
$gte ○
$in ○
$lt ○
$lte ○
$ne ○
$nin ○

要素演算子

オペレーター サポート対象
$exists ○
$type ○

評価クエリ演算子

オペレーター サポート対象
$expr ○
$jsonSchema ×
$mod ○
$regex ○
$text ×
$where ×

論理演算子

オペレーター サポート対象
$and ○
$nor ○
$not ○
$or ○

プロジェクション演算子

オペレーター サポート対象
$ ○
$elemMatch ○
$meta 一部(`textScore` をサポート)
$slice ○

更新演算子

Cloud Firestore は、次の更新演算子をサポートしています。

配列演算子

オペレーター サポート対象
$ ○
$[] ○
$[<identifier>] ○
$addToSet ○
$percentile ○
$pop ○
$pull ○
$pullAll ○
$push ○

ビット演算子

オペレーター サポート対象
$bit ○

フィールド演算子

オペレーター サポート対象
$currentDate ○
$inc ○
$max ○
$min ○
$mul ○
$rename ○
$set ○
$setOnInsert ○
$unset ○

更新修飾子

修飾子 サポート対象
$each ○
$position ○
$slice ○
$sort ○

集計パイプライン演算子

Cloud Firestore は、次の集計パイプライン演算子をサポートしています。

アキュムレータ

式 サポート対象
$accumulator ×
$addToSet ○
$avg ○
$bottom ×
$bottomN ×
$count ○
$first ○
$firstN ×
$last ○
$lastN ×
$max ○
$maxN ×
$median ×
$mergeObjects ○
$min ○
$minN ×
$percentile ×
$push ○
$stdDevPop ×
$stdDevSamp ×
$sum ○
$top ×
$topN ×

アキュムレータ式

式 サポート対象
$avg ○
$first ○
$last ○
$max ○
$median ○
$min ○
$percentile ○
$stdDevPop ×
$stdDevSamp ×
$sum ○

算術演算子

制限事項: 算術演算子は decimal128 値をサポートしていません。

オペレーター サポート対象
$abs ○
$add ○
$ceil ○
$divide ○
$exp ○
$floor ○
$ln ○
$log ○
$log10 ○
$mod ○
$multiply ○
$pow ○
$round ○
$sqrt ○
$subtract ○
$trunc ○

配列演算子

オペレーター サポート対象
$arrayElemAt ○
$arrayToObject ○
$concatArrays ○
$filter ○
$firstN ○
$in ○
$indexOfArray ○
$isArray ○
$lastN ○
$map ○
$maxN ○
$minN ○
$objectToArray ○
$range ○
$reduce ○
$reverseArray ○
$size ○
$slice ○
$sortArray ○
$zip ○

ブール演算子

オペレーター サポート対象
$and ○
$not ○
$or ○

比較演算子

オペレーター サポート対象
$cmp ○
$eq ○
$gt ○
$gte ○
$lt ○
$lte ○
$ne ○

条件式演算子

オペレーター サポート対象
$cond ○
$ifNull ○
$switch ○

データサイズ演算子

オペレーター サポート対象
$binarySize ○
$bsonSize ○

日付演算子

オペレーター サポート対象
$dateAdd ○
$dateDiff ○
$dateFromParts ○
$dateFromString ○
$dateSubtract ○
$dateToParts ○
$dateToString ○
$dateTrunc ○
$dayOfMonth ○
$dayOfWeek ○
$dayOfYear ○
$hour ○
$isoDayOfWeek ○
$isoWeek ○
$isoWeekYear ○
$millisecond ○
$minute ○
$month ○
$second ○
$toDate ○
$week ○
$year ○

タイムスタンプ演算子

オペレーター サポート対象
$tsIncrement ×
$tsSecond ×

その他の演算子

オペレーター サポート対象
$getField ○
$natural ○(昇順)
$rand ○
$sampleRate ×
$toHashedIndexKey ×

リテラル式演算子

オペレーター サポート対象
$literal ○

オブジェクト演算子

オペレーター サポート対象
$mergeObjects ○
$objectToArray ○
$setField ×

集合演算子

オペレーター サポート対象
$allElementsTrue ○
$anyElementTrue ○
$setDifference ○
$setEquals ○
$setIntersection ○
$setIsSubset ○
$setUnion ○

ステージ演算子

オペレーター サポート対象
$addFields ○
$bucket ○
$bucketAuto ×
$changeStream ×
$collStats ×
$count ○
$currentOp ×
$documents ○
$facet ○
$geoNear ×
$graphLookup ×
$group ○
$indexStats ×
$limit ○
$listLocalSessions ×
$listSessions ×
$lookup

○

let フィールドと pipeline フィールドはサポートされていません。

$match ○
$merge ×
$out ×
$planCacheStats ×
$project ○
$redact ×
$replaceRoot ○
$replaceWith ○
$sample ○
$set ○
$search ×
$setWindowFields ×
$skip ○
$sort ○
$sortByCount ○
$unionWith ○
$unset ○
$unwind ○

文字列演算子

オペレーター サポート対象
$concat ○
$dateFromString ○
$dateToString ○
$indexOfBytes ○
$indexOfCP ○
$ltrim ○
$regexFind ○
$regexFindAll ○
$regexMatch ○
$replaceAll ○
$replaceOne ○
$rtrim ○
$split ○
$strcasecmp ○
$strLenBytes ○
$strLenCP ○
$substr ○
$substrBytes ○
$substrCP ○
$toLower ○
$toString ○
$toUpper ○
$trim ○

システム変数

変数 サポート対象
$$CLUSTERTIME No
$$CURRENT ×
$$DESCEND No
$$KEEP ×
$$NOW Yes
$$PRUNE ×
$$REMOVE Yes
$$ROOT ○

テキスト演算子

オペレーター サポート対象
$meta ×

三角関数演算子

オペレーター サポート対象
$acos ×
$acosh ×
$asin ×
$asinh ×
$atan ×
$atan2 ×
$atanh ×
$cos ×
$cosh ×
$degreesToRadians ×
$radiansToDegrees ×
$sin ×
$sinh ×
$tan ×
$tanh ×

型演算子

オペレーター サポート対象
$convert ○
$isNumber ○
$toBool ○
$toDate ○
$toDecimal ○
$toDouble ○
$toInt ○
$toLong ○
$toObjectId ○
$toString ○
$type ○

変数演算子

オペレーター サポート対象
$let ○

地理空間

Cloud Firestore は、次の地理空間演算子をサポートしています。

ジオメトリ指定子

指定子 サポート対象
$box ×
$center ×
$centerSphere ×
$geometry ×
$maxDistance ×
$minDistance ×
$polygon ×
$uniqueDocs ×

クエリ セレクタ

セレクタ サポート対象
$geoIntersects ×
$geoWithin ×
$near ×
$nearSphere ×
$nearSphere ×
$uniqueDocs ×

インデックスとインデックスのプロパティ

Cloud Firestore は、次のインデックスとインデックス演算子をサポートしています。

インデックス

インデックス タイプ サポート対象
2d ×
2dsphere ×
複合 ○
ハッシュ化 ×
マルチキー ○
単一フィールド ○
テキスト ×

インデックスのプロパティ

プロパティ サポート対象
バックグラウンド ○
大文字と小文字の区別なし ×
非表示 ×
一部 ×
Non-Sparse ○
スパース ○
テキスト ×
TTL ○
ユニーク ○
ワイルドカード ×
Vector ×

データベース コマンド

Cloud Firestore は、次のデータベース コマンドをサポートしています。

集計

コマンド サポート対象
aggregate ○
count ○
distinct ○
group

×

集計の $group ステージはサポートされていますが、グループ コマンドはサポートされていません。

mapReduce ×

認証

コマンド サポート対象
authenticate ×
getnonce ×
logout ×

クエリオペレーションと書き込みオペレーション

コマンド サポート対象
watch(変更ストリーム) ×
delete ○
eval ×
find ○
findAndModify ○
getLastError ○
getMore ○
getPrevError ×
GridFS ×
insert ○
parallelCollectionScan ×
replaceOne

×

replaceOne ドライバ メソッドは update コマンドでサポートされています。

resetError ×
update ○

セッション コマンド

コマンド サポート対象
abortTransaction ○
commitTransaction ○
endSessions ○
killAllSessions ×
killAllSessionsByPattern ×
killSessions ×
refreshSessions ×
startSession

セッションは、startSession ドライバ メソッドを使用して開始できます。

管理コマンド

Cloud Firestore は、次の管理コマンドをサポートしています。

コマンド サポート対象
cloneCollectionAsCapped ×
collMod ×
collMod: expireAfterSeconds ×
convertToCapped ×
copydb ×
create ○
createIndex ○
createIndexes ○
createView ×
currentOp ×
drop ×
dropDatabase

×

データベースを削除するには、データベースの削除をご覧ください。

dropIndex

○

インデックスを削除するには、インデックスの管理をご覧ください。

dropIndexes

×

filemd5 ×
getAuditConfig ×
killCursors ○
killOp ×
listCollections ○
listDatabases ○
listIndexes ○
reIndex ×
renameCollection ×
setAuditConfig ×

診断コマンド

コマンド サポート対象
buildInfo ○
collStats ×
connectionStatus ○
connPoolStats ×
dataSize ×
dbHash ×
dbStats ×
explain

○

動作の違いと制限事項については、Query Explain をご覧ください。

features ×
hello ○
hostInfo ○
listCommands ×
profiler ×
serverStatus ×
top ×
whatsmyuri ×

ロール管理コマンド

データベース アクセスを管理するため、Cloud Firestore は Identity and Access Management のロールと権限をサポートしています。

コマンド サポート対象
createRole ×
dropAllRolesFromDatabase ×
dropRole ×
grantRolesToRole ×
revokePrivilegesFromRole ×
revokeRolesFromRole ×
rolesInfo ×
updateRole ×

次のステップ