Quick Navigator

Search Site

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

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



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

Mongoose::Engine - serialization for MongoDB driver

The Mongoose standard engine. Does all the dirty work. Very monolithic. Replace it with your engine if you want.

Just like "find_one" in MongoDB::Collection, but blesses the hash document into your class package.
Also has a handy mode which allows retrieving an "_id" directly from a BSON:OID or just a string:
   my $author = Author->find_one( '4dd77f4ebf4342d711000000' );
Which expands onto:
   my $author = Author->find_one({
       _id => BSON::OID->new( value => pack( 'H*', '4dd77f4ebf4342d711000000' ) )

Just like "find" in MongoDB::Collection, but returns a Mongoose::Cursor of documents blessed into your package.

Just like "query" in MongoDB::Collection, but returns a Mongoose::Cursor of documents blessed into your package.

Helper and back-compat method to call estimated_document_count() or count_documents() depending on arguments passed.

Just like "estimated_document_count" in MongoDB::Collection.

Just like "count_documents" in MongoDB::Collection.

Deletes the document in the database.

Turns an object into a hash document.

Turns a hash document back into an object.

This is an empty method called by expand() after a document was turned into an object. This was added in version 2 to allow old classes to handle dates on nested types that previously were DateTime objects and now are BSON::Time, but it can be used/abused to any kind of fix to the expanded object.
It's recommended to use with care and alway using method modifiers (after) to allow subclassing and composition.

Returns the MongoDB::Collection object for this class or object.

Commits the object to the database.

Returns the object's corresponding MongoDB::Database instance.

Checks all Mongoose::Join fields for invalid references to foreign object ids.
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.