The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mongoose::Engine::Base - heavy lifting done here

VERSION

version 0.26

DESCRIPTION

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

METHODS

find_one

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 an string:

   my $author = Author->find_one( '4dd77f4ebf4342d711000000' ); 

Which expands onto:

   my $author = Author->find_one({
       _id=>MongoDB::OID->new( value=>'4dd77f4ebf4342d711000000' )
   }); 

find

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

query

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

delete

Deletes the document in the database.

collapse

Turns an object into a hash document.

expand

Turns a hash document back into an object.

collection

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

save

Commits the object to the database.

db

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

fix_integrity

Checks all Mongoose::Join fields for invalid references to foreign object ids.