downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoCursor::key> <MongoCursor::immortal
[edit] Last updated: Fri, 23 Mar 2012

view this page in

MongoCursor::info

(PECL mongo >=1.0.5)

MongoCursor::infoGets the query, fields, limit, and skip for this cursor

Açıklama

public array MongoCursor::info ( void )

This can be called before or after the query.

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Returns the namespace, limit, skip, query, and fields for this cursor.

Sürüm Bilgisi

Sürüm: Açıklama
1.0.10 Added started_iterating field, a boolean indicating if cursor is pre- or post-query.
1.1.0 Added a number of other fields, including id (the cursor id), at (the driver's counter of which document is current), numReturned (the number returned by the server in the current batch), and server (which server the query was sent to—useful in conjunction with MongoCursor::slaveOkay()).

Örnekler

Örnek 1 MongoCursor::info() example

<?php

$m 
= new Mongo();
$cursor $m->foo->bar->find(array("x" => 4), array("y" => false));
var_dump($cursor->info());

?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

array(5) {
  ["ns"]=>
  string(7) "foo.bar"
  ["limit"]=>
  int(0)
  ["skip"]=>
  int(0)
  ["query"]=>
  array(1) {
    ["x"]=>
    int(4)
  }
  ["fields"]=>
  array(1) {
    ["y"]=>
    int(0)
  }
}


add a note add a note User Contributed Notes MongoCursor::info
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites