略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoCursor::snapshot

2024-12-22

MongoCursor::snapshot

(PECL mongo >=0.9.4)

MongoCursor::snapshotUse snapshot mode for the query

说明

public MongoCursor::snapshot ( void ) : MongoCursor

Use snapshot mode for the query. Snapshot mode ensures that a document will not be returned more than once because an intervening write operation results in a move of the document. Documents inserted or deleted during the lifetime of the cursor may or may not be returned, irrespective of snapshot mode.

Queries with short responses (less than 1MB) are always effectively snapshotted.

Snapshot mode may not be used with sorting, explicit hints, or queries on sharded collections.

参数

此函数没有参数。

返回值

Returns this cursor.

错误/异常

Throws MongoCursorException if this cursor has started iterating.

参见

MongoDB core docs on » $snapshot operator.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mongocursor.snapshot.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3