Database Manual / Reference / Query Language

CRUD CommandsCRUD命令

CRUD commands create, read, update, and delete documents.CRUD命令用于创建读取更新删除文档

Name名字Description描述

aggregate

Runs an aggregation pipeline on a collection or view.在集合或视图上运行聚合管道

bulkWrite

Performs many insert, update, and delete operations on multiple collections in one request.在一个请求中对多个集合执行许多插入、更新和删除操作。

New in version 8.0.8.0版本中的新功能。

count

Counts the number of documents in a collection or a view.统计集合或视图中的文档数。

delete

Deletes one or more documents.删除一个或多个文档。

distinct

Returns distinct values in a specified field from a collection or view.从集合或视图中返回指定字段中的不同值。

find

Selects documents in a collection or a view.选择集合或视图中的文档。

findAndModify

Returns and modifies a single document.返回并修改单个文档。

insert

Inserts one or more documents.插入一个或多个文档。

mapReduce

Performs map-reduce aggregation.执行map-reduce聚合。

update

Updates one or more documents.更新一个或多个文档。