NAME
Mongoose::Engine::V0 - heavy lifting done here
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 a MongoDB::OID or just a 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.
count
Just like "count" in MongoDB::Collection.
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.