GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mongoose::Cursor(3) User Contributed Perl Documentation Mongoose::Cursor(3)
 

Mongoose::Cursor - a Mongoose wrapper for MongoDB::Cursor

Extends Mongoose::Cursor.
Wraps MongoDB::Cursor's "next", "all" and "batch" methods, so that it expands a document into a class.

For your convenience:

Same as calling count() on the collection. It will allways return the total counting of the filter ignoring skip() and limit().

Iterates over a cursor, calling your sub.
    Person->find->each( sub {
        my $obj = shift;
        # do stuff
        # return undef to break out
        return undef if $done;
    });

Returns all data as a HASH indexed by the key sent as first argument. Rows with duplicate keys are ignored.
    %tracks = $cd->tracks->find->hash_on('track_name');

Returns all data as a HASH indexed by the key sent as first argument. Hash values are ARRAYREFs with 1 or more rows.
    %tracks = $cd->tracks->find->hash_array('track_name');
2018-10-08 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.