The method set MongoDB shell 3

Method name description
db.collection.aggregate() Data results of the polymerization, primarily for processing data (such as statistical averages, sums, etc.), and returns the calculated
db.collection.bulkWrite() Batch write
db.collection.createIndex() Create a set of index
db.collection.count() Returns a collection of the total number or the total number of results that match the query set
db.collection.deleteOne() To delete a document collection
db.collection.deleteMany() Delete multiple documents in the collection
db.collection.dataSize() Returns the size of the collection
db.collection.distinct() Returns the specified documents with different values ​​of the field (specified field data deduplication)
db.collection.dropIndex() To delete a specified index in the collection
db.collection.dropIndexes() Delete a collection of all indexes
db.collection.drop() Delete collection collection in the current database
db.collection.explain() Return query execution information of various methods
db.collection.findOne() Single query data
db.collection.findOneAndReplace() Single data query and replace
db.collection.findOneAndDelete() Single query and delete data
db.collection.findOneAndUpdate() A single query and update data
db.collection.find() Set of queries, all without parameter query and returns a cursor object
db.collection.findAndModify() Query and modify
db.collection.getIndexes() All index returns an array of current collection
db.collection.group() It provides simple data aggregation
db.collection.isCapped() Determining whether to set the constant capacity
db.collection.insert() Insert one or more data collection in the current (or called document)
db.collection.insertMany() Inserting a plurality of data set in the current
db.collection.insertOne() Inserting a set of data in the current
db.collection.reIndex() Rebuild all indexes of the current collection
db.collection.renameCollection() Rename Collection Name
db.collection.replaceOne() Alternatively a document collection (a data)
db.collection.remove() Delete data from the current collection
db.collection.save() Updated data has been inserted
db.collection.stats() Returns the status of the current collection
db.collection.storageSize() Returns the current set of space has been used
db.collection.totalSize() Returns the current total footprint collection, including all documents and all indexes
db.collection.totalIndexSize() Returns the current set of space occupied by all the indexes
db.collection.updateMany() Modifying the plurality of data collection
db.collection.update() Modifying the data set
db.collection.updateOne() A modification data set
db.collection.validate() Performing a verify operation set

Guess you like

Origin www.cnblogs.com/xibuhaohao/p/12044325.html