发布于 2015-09-14 14:46:07 | 159 次阅读 | 评论: 0 | 来源: 网络整理

cursor.limit()

Use the cursor.limit() method on a cursor to specify the maximum number of documents a the cursor will return. cursor.limit() is analogous to the LIMIT statement in a SQL database.

注解

You must apply cursor.limit() to the cursor before retrieving any documents from the database.

Use cursor.limit() to maximize performance and prevent MongoDB from returning more results than required for processing.

A cursor.limit() value of 0 (e.g. “.limit(0)”) is equivalent to setting no limit.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务