Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Remove an object from a collection.
        

        def remove_object (object):
	""" Remove an object from a collection.
	"""
	collection_name = object.__class__.__name__

	with errors._protect():
		connection.connection()[collection_name].remove({"_id": object["_id"]})

	del __objects[object["_id"]]

	logger.debug("Object %s was removed from collection '%s'." % (object, collection_name))
        


src/m/e/MetagenomeDB-0.2rev15/lib/MetagenomeDB/classes.py   MetagenomeDB(Download)
			# remove the object from the database
			with errors._protect():
				backend.remove_object(self)
 
			# and declare it has never having been committed