这个就是对find方法的补充

Name Description
cursor.addOption() Adds special wire protocol flags that modify the behavior of the query.’
cursor.batchSize() Controls the number of documents MongoDB will return to the client in a single network message.
cursor.close() Close a cursor and free associated server resources.
cursor.isClosed() Returns true if the cursor is closed.
cursor.collation() Specifies the collation for the cursor returned by the db.collection.find().
cursor.comment() Attaches a comment to the query to allow for traceability in the logs and the system.profile collection.
cursor.count() Modifies the cursor to return the number of documents in the result set rather than the documents themselves.
cursor.explain() Reports on the query execution plan for a cursor.
cursor.forEach() Applies a JavaScript function for every document in a cursor.
cursor.hasNext() Returns true if the cursor has documents and can be iterated.
cursor.hint() Forces MongoDB to use a specific index for a query.
cursor.isExhausted() Returns true if the cursor is closed and there are no objects remaining in the batch.
cursor.itcount() Computes the total number of documents in the cursor client-side by fetching and iterating the result set.
cursor.limit() Constrains the size of a cursor’s result set.
cursor.map() Applies a function to each document in a cursor and collects the return values in an array.
cursor.max() Specifies an exclusive upper index bound for a cursor. For use with cursor.hint()
cursor.maxTimeMS() Specifies a cumulative time limit in milliseconds for processing operations on a cursor.
cursor.min() Specifies an inclusive lower index bound for a cursor. For use with cursor.hint()
cursor.next() Returns the next document in a cursor.
cursor.noCursorTimeout() Instructs the server to avoid closing a cursor automatically after a period of inactivity.
cursor.objsLeftInBatch() Returns the number of documents left in the current cursor batch.
cursor.pretty() Configures the cursor to display results in an easy-to-read format.
cursor.readConcern() Specifies a read concern for a find() operation.
cursor.readPref() Specifies a read preference to a cursor to control how the client directs queries to a replica set.
cursor.returnKey() Modifies the cursor to return index keys rather than the documents.
cursor.showRecordId() Adds an internal storage engine ID field to each document returned by the cursor.
cursor.size() Returns a count of the documents in the cursor after applying skip() and limit() methods.
cursor.skip() Returns a cursor that begins returning results only after passing or skipping a number of documents.
cursor.sort() Returns results ordered according to a sort specification.
cursor.tailable() Marks the cursor as tailable. Only valid for cursors over capped collections.
cursor.toArray() Returns an array that contains all documents returned by the cursor.

参考:
https://docs.mongodb.com/manual/reference/method/js-cursor/

MongoDB Cursor Methods相关推荐

  1. 【MongoDB】01、MongoDB基础

    一.MongoDB概述 1.MogoDB简介 什么是MongoDB ? MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统. 在高负载的情况下,添加更多的节点,可以保证服务 ...

  2. MongoDB学习笔记(七)——MongoDB shell方法汇总

    在写前面的博文的时候,我发现MongoDB shell提供了很多方法,其中MongoDB的很多方法也在其中,下面是我从MongoDB官网上查到的所有MongoDB shell的所有方法,当然,我不会对 ...

  3. mongodb AND查询遇到多个index时候可能会做交集——和复合索引不同

    关于MongoDB中索引文档的一个问题? - To illustrate index intersection, consider a collection orders that has the f ...

  4. 利用python编写爬虫程序,从招聘网站上爬取数据,将数据存入到MongoDB数据库中,将存入的数据作一定的数据清洗后做数据分析,最后将分析的结果做数据可视化

    教程演示 创建爬虫项目 编写需要爬取的字段(items.py) 编写spider文件(wuyou.py) 编写数据库连接(pipelines.py) 编写反爬措施(settings.py) Mongo ...

  5. MongoDB的skip,limit,sort执行顺序,以及aggregate

    执行顺序 .find().sort().skip().limit()中.sort().skip().limit()的各种排列组合. 当sort,skip,limit一起使用时,无论其位置变化,总是先s ...

  6. mongo实现消息队列

    2019独角兽企业重金招聘Python工程师标准>>> 使用mongo来构建一个简单的消息队列 MongoDB 有一个叫 Tailable Cursors的特性,它类似于tail - ...

  7. Python DB-API 2.0规范

    Python DB-API 2.0规范 PEP:  249 标题: Python Database API Specification v2.0 版本: 83893e13db91 修改日期: 2008 ...

  8. mongoengine中queryset触发网络访问机制剖析

    背景 最近新上线的一个服务,偶尔会有超时告警,其主要逻辑仅仅只是简单的读/写mongodb,而且服务上线初期,流量并不大,因而理论上来说,每次请求都应该很快才对,事实上分析日志也证实90%以上的请求都 ...

  9. python关于row的规范_Python DB-API 2.0规范

    Python DB-API 2.0规范 PEP: 249 标题: Python Database API Specification v2.0 版本: 83893e13db91 作者: Marc-An ...

最新文章

  1. php 循环向select添加选项
  2. 小知识系列:数据库的主键和外键
  3. swift - 使用系统app导航
  4. arm架构和x86架构_ARM、X86和MIPS主流架构优缺点分析
  5. Ground Turth在深度学习中的意思
  6. JS对cookie进行操作
  7. visual studio code无法连接网络,五种方法
  8. 用collectionview实现瀑布流-转(后面附demo,供参考)
  9. vulkan 利用GPU加速ENet
  10. PDF编辑方法,怎么删除PDF文档中的空白页
  11. vba删除word中图片与文本框等shape
  12. 路由器和交换机的区别
  13. 【电商运营】试试这5种个性化营销方法,告别无效营销!
  14. pug安装与使用教程
  15. OCR识别数学公式图片,获得原始公式代码
  16. 计算机专业应届毕业生找工作一定要知道的面试题--必背版
  17. 你还在关注 AGV,而 AMR 已经悄然崛起
  18. python豆瓣电影top250爬虫课程设计_[教程]图文:爬虫爬取豆瓣电影top250
  19. 潭州学院html学习(day05)
  20. 微型计算机最核心的补件,春季高考试卷-天津市2016年春季高考计算机模拟试卷B【精】.doc...

热门文章

  1. eclipse导入wsdl文件_IntelliJ IDEA的学习笔记(三、eclipse项目怎么导入idea中)
  2. Python使用UDP广播实现服务器自动发现
  3. Python简易验证码生成程序
  4. Linux系统升级维护费,Antergos Linux 宣布停止维护
  5. 面试中死锁的考点总结(死锁的定义、产生原因、四个必要条件、如何预防)
  6. php上传图片大小判断,jQuery实现判断上传图片类型和大小的方法示例
  7. 用js实现一个无限循环的动画
  8. pyqt5中控件缩放功能_python GUI库图形界面开发之PyQt5动态(可拖动控件大小)布局控件QSplitter详细使用方法与实例...
  9. @autowired注解原理_Spring框架第二谈:IOC,xml配置文件给属性赋值,注解实现赋值...
  10. python 视频流_Python实现mjpeg视频流