本文为您介绍SQL窗口的新版解析器支持的MongoDB命令。
注意事项
- MongoDB的SQL窗口默认呈现新版解析器。
- 若由于业务需要转换到旧版解析器,可以单击SQL窗口页面右上角的
图标,进入旧版解析器。 - SQL窗口的新版解析器支持的MongoDB命令不区分大小写。
支持的命令
命令分类 | 具体类型枚举 |
---|
集合命令 | - 查询命令
data,正则表达式,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,getShardVersion。 - 数据更新命令
insert,insertOne,insertMany,save,findAndModify,remove,update,updateOne,updateMany,reIndex,bulkWrite。 - 集合修改命令
drop,renameCollection,replaceOne,dropIndexes,deleteOne。 - 索引修改命令
createIndex,createIndexes,dropIndexes,reIndex,deleteMany。 - 其他命令
validate
|
DB命令 | - 数据库查询命令
adminCommand,commandHelp,getCollectionInfos,getCollectionNames,getLogComponents,getProfilingStatus,getSiblingDB,help,hostInfo,isMaster,listCommands,serverStatus,resetError,serverBuildInfo,serverCmdLineOpts,setLogLevel,setProfilingLevel,stats,version。 - 创建集合命令
createCollection - 创建视图命令
createView - 高危命令
currentOp,fsyncLock,fsyncUnlock。
|
查询缓存 | - 方括号
[] 格式,例如db['users']find()。 - 循环遍历函数
forEach,map
|