Cursor Methods游标方法
mongosh Methods
The methods listed on this table of contents page are 这个目录页上列出的方法是mongosh
methods. mongosh
方法。This is not the documentation for 这不是Node.js或其他编程语言特定驱动程序方法的文档。Node.js
or other programming language specific driver methods.
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 Server版本的文档:
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 a specific method, including syntax and examples, click on the link to the method's 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() | |
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() | |
cursor.tryNext() | null ,则返回迭代中的下一个元素。 |