The methods listed on this table of contents page are 目录页上列出的方法是mongosh
methods. mongosh
方法。This is not the documentation for 这不是Node.js
or other programming language specific driver methods.Node.js
或其他编程语言特定驱动程序方法的文档。
In most cases, 在大多数情况下,mongosh
methods work the same way as the legacy mongo
shell methods. mongosh
方法的工作方式与传统mongo
Shell方法相同。However, some legacy methods are unavailable in 但是,一些传统方法在mongosh
.mongosh
中不可用。
For the legacy 有关传统mongo
shell documentation, refer to the documentation for the corresponding MongoDB Server release:mongo
Shell文档,请参阅相应MongoDB服务器版本的文档:
For MongoDB API drivers, refer to the language specific MongoDB driver documentation.有关MongoDB API驱动程序,请参阅特定于语言的MongoDB驱动程序文档。
These methods modify the way that the underlying query is executed.这些方法修改执行基础查询的方式。
For details on specific methods, including syntax and examples, click on the specific method to go to its reference page.有关特定方法的详细信息,包括语法和示例,请单击特定方法以转到其参考页面。
cursor.addOption() | |
cursor.allowDiskUse() | |
cursor.allowPartialResults() | db.collection.find() operations against a sharded collection to return partial results, rather than an error, if one or more queried shards are unavailable.db.collection.find() 操作返回部分结果,而不是错误。
|
cursor.batchSize() | |
cursor.close() | |
cursor.isClosed() | true if the cursor is closed.true 。 |
cursor.collation() | db.collection.find() .db.collection.find() 返回的游标的排序规则。
|
cursor.comment() | system.profile 集合中的可跟踪性。
|
cursor.count() | |
cursor.explain() | |
cursor.forEach() | |
cursor.hasNext() | true 。 |
cursor.hint() | |
cursor.isExhausted() | true if the cursor is closed and there are no objects remaining in the batch.true 。
|
cursor.itcount() | |
cursor.limit() | |
cursor.map() | |
cursor.max() | cursor.hint() cursor.hint() 一起使用
|
cursor.maxAwaitTimeMS() | |
cursor.maxTimeMS() | |
cursor.min() | cursor.hint() cursor.hint() 一起使用
|
cursor.next() | |
cursor.noCursorTimeout() | |
cursor.objsLeftInBatch() | |
cursor.pretty() | |
cursor.readConcern() | find() operation.find() 操作的读取关注点。 |
cursor.readPref() | |
cursor.returnKey() | |
cursor.showRecordId() | |
cursor.size() | skip() and limit() methods.skip() 和limit() 方法后,返回游标中文档的计数。
|
cursor.skip() | |
cursor.sort() | |
cursor.tailable() | |
cursor.toArray() |