|
NAMEMongoose::Engine - serialization for MongoDB driverDESCRIPTIONThe Mongoose standard engine. Does all the dirty work. Very monolithic. Replace it with your engine if you want.METHODSfind_oneJust 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' ) ) }); findJust like "find" in MongoDB::Collection, but returns a Mongoose::Cursor of documents blessed into your package.queryJust like "query" in MongoDB::Collection, but returns a Mongoose::Cursor of documents blessed into your package.countHelper and back-compat method to call estimated_document_count() or count_documents() depending on arguments passed.estimated_document_countJust like "estimated_document_count" in MongoDB::Collection.count_documentsJust like "count_documents" in MongoDB::Collection.deleteDeletes the document in the database.collapseTurns an object into a hash document.expandTurns a hash document back into an object.expandedThis 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. collectionReturns the MongoDB::Collection object for this class or object.saveCommits the object to the database.dbReturns the object's corresponding MongoDB::Database instance.fix_integrityChecks all Mongoose::Join fields for invalid references to foreign object ids.
Visit the GSP FreeBSD Man Page Interface. |