a method to remove collection and all records in the collection

        :return: string with confirmation of deletion
333120
def remove(self):
        
        ''' 
            
        '''
    
        title = '%s.remove' % self.__class__.__name__
    
    # request bucket delete 
        self.s3.delete_bucket(self.bucket_name)

    # return confirmation
        exit_msg = '%s collection has been removed from S3.' % self.bucket_name
        return exit_msg
488890
def _delete_collection(self, **kwargs):
        
        error_message = "The request must include \"requests_params\": {\"params\": \"options=<glob pattern>\"} as kwarg"
        try:
            if kwargs['requests_params']['params'].split('=')[0] != 'options':
                raise MissingRequiredRequestsParameter(error_message)
        except KeyError:
            raise

        requests_params = self._handle_requests_params(kwargs)
        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']

        session.delete(delete_uri, **requests_params)
880306
def remove_data(self, request, pk=None):
        """"""
        collection = self.get_object()

        if 'ids' not in request.data:
            return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)

        for data_id in request.data['ids']:
            collection.data.remove(data_id)

        return Response()
637547
def remove(self, record):
        """"""
        self._field.validate_value(record)
        del self._elements[record.id]
        self._sync_field()
1289060
def delete(self):
        

        es = connections.get_connection(self._using)

        return AttrDict(
            es.delete_by_query(
                index=self._index,
                body=self.to_dict(),
                **self._params
            )
        )
371932
async def delete(self, _id=None):
		
		if not _id:
			return {"error":400, 
					"reason":"Missed required fields"}

		document = await self.collection.find_one({"id": _id})

		if not document:
			return {"error":404, 
					"reason":"Not found"}

		deleted_count = await self.collection.delete_one(
							{"id": _id}).deleted_count

		return deleted_count
1164063
@Override
	public boolean removeAll(Collection<?> collection) {
		if (booleanTerms == null) {
			return false;
		}
		return booleanTerms.removeAll(collection);
	}
245707
def delete(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
               allow_redirects=False):
        
        response = self.request(
            method,
            uri,
            params=params,
            data=data,
            headers=headers,
            auth=auth,
            timeout=timeout,
            allow_redirects=allow_redirects,
        )

        if response.status_code < 200 or response.status_code >= 300:
            raise self.exception(method, uri, response, 'Unable to delete record')

        return response.status_code == 204
78254
def remove(self, db):
        
        assert self.collection
        assert self.id

        db[self.collection].remove(self.id)
251531
def delete_record(self, domain, record):
        
        uri = "/domains/%s/records/%s" % (utils.get_id(domain),
                utils.get_id(record))
        resp, resp_body = self._async_call(uri, method="DELETE",
                error_class=exc.DomainRecordDeletionFailed, has_response=False)
        return resp_body
1236715
def truncate!
      Clients.default.database.collections.each do |collection|
        collection.find.delete_many
      end and true
    end
1192754
def removeCurrentItem(self):
        
        logger.debug("removeCurrentFile")
        currentIndex = self.getRowCurrentIndex()
        if not currentIndex.isValid():
            return

        self.model().deleteItemAtIndex(currentIndex)
1156998
def purge_collection(keys):
    ""
    for key in keys:
        m = re.match(r'(.*) \((\d+)\)', key)
        name = m.group(1)
        node_id = m.group(2)
        value = render_value_for_node(node_id)
        print 'remove node with name:{0} and id:{1}'.format(name, node_id)

        delete_node(node_id=node_id)
        if isinstance(value, dict):
            purge_collection(value.keys())
540729
def delete(self, **kwargs):
        
        self.reload_context(es_based=False, **kwargs)
        return super(ESCollectionView, self).delete(**kwargs)
21646
def delete(self):
        
        # Delete each field
        for field_name in self._fields:
            field = self.get_field(field_name)
            if not isinstance(field, PKField):
                # pk has no stored key
                field.delete()
        # Remove the pk from the model collection
        self.connection.srem(self.get_field('pk').collection_key, self._pk)
        # Deactivate the instance
        delattr(self, "_pk")
1156740
def clearAll(self):
        
        # clear the tree information
        self.clear()
        
        # clear table information
        self._tableTypeName  = ''
        self._tableType      = None
        
        # clear the records information
        self._recordSet         = None
        self._currentRecordSet  = None
        
        # clear lookup information
        self._query             = None
        self._order             = None
        self._groupBy           = None
        
        # clear paging information
        
        if not self.signalsBlocked():
            self.recordsChanged.emit()
412636
def delete_mongo(database_name, collection_name,
                 query={}, just_one=False):
    """"""

    l = []
    response_dict = {}

    try:
        mongodb_client_url = getattr(settings, 'MONGODB_CLIENT',
                                     'mongodb://localhost:27017/')
        mc = MongoClient(mongodb_client_url, document_class=OrderedDict)
        db = mc[str(database_name)]
        collection = db[str(collection_name)]

        mysearchresult = collection.remove(query, just_one)

        response_dict['code'] = 200
        response_dict['type'] = "remove-confirmation"

    except:
        # print "Error reading from Mongo"
        # print str(sys.exc_info())
        response_dict['num_results'] = 0
        response_dict['code'] = 500
        response_dict['type'] = "Error"
        response_dict['results'] = []
        response_dict['message'] = str(sys.exc_info())
    return response_dict