Retire metadata of all the assets.
    ---
    tags:
      - ddo
    responses:
      200:
        description: successfully deleted
      500:
        description: Error
193045
def retire_all():
    
    try:
        all_ids = [a['id'] for a in dao.get_all_assets()]
        for i in all_ids:
            dao.delete(i)
        return 'All ddo successfully deleted', 200
    except Exception as e:
        logger.error(e)
        return 'An error was found', 500
56448
def list_assets_ddo(self):
        
        return json.loads(self.requests_session.get(self.url).content)
666858
public function dropDatabases()
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument) {
                continue;
            }
            $this->dropDocumentDatabase($class->name);
        }
    }
1354280
def delete(collection_name, spec, safe,
           last_error_args, opts, flags=0):
    
    data = _ZERO_32
    data += bson._make_c_string(collection_name)
    data += struct.pack("<I", flags)
    encoded = bson.BSON.encode(spec, False, opts)
    data += encoded
    if safe:
        (_, remove_message) = __pack_message(2006, data)
        (request_id, error_message, _) = __last_error(collection_name,
                                                      last_error_args)
        return (request_id, remove_message + error_message, len(encoded))
    else:
        (request_id, remove_message) = __pack_message(2006, data)
        return (request_id, remove_message, len(encoded))
196873
def drop(self):
        
        api = self._instance._client.database_admin_api
        metadata = _metadata_with_prefix(self.name)
        api.drop_database(self.name, metadata=metadata)
470607
def purge_archived_resources(user, table):
    

    if user.is_not_super_admin():
        raise dci_exc.Unauthorized()

    where_clause = sql.and_(
        table.c.state == 'archived'
    )
    query = table.delete().where(where_clause)
    flask.g.db_conn.execute(query)

    return flask.Response(None, 204, content_type='application/json')
1301200
def rm(self, path):
        """"""

        resp = self._sendRequest("DELETE", path)
        # By documentation server must return 200 "OK", but I get 204 "No Content".
        # Anyway file or directory have been removed.
        if not (resp.status_code in (200, 204)):
            raise YaDiskException(resp.status_code, resp.content)
1303605
def _cleanup(self, domains):
        """"""
        for option in domains.values():
            try:
                os.remove(option['pot'])
            except (IOError, OSError):
                # It is not a problem if we can't actually remove the temporary file
                pass
938183
def delete_asset(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "DELETE",
            self.url
        )
        return True
237995
def delete_all_banks(self):
        
        for file in glob(str(self.data_path) + "/*.json"):
            Persistence.delete(file)
485804
def dropdb():
    """"""
    manager.db.engine.echo = True
    if prompt_bool("Are you sure you want to lose all your data"):
        manager.db.drop_all()
        metadata, alembic_version = alembic_table_metadata()
        alembic_version.drop()
        manager.db.session.commit()
709441
def command_drop_tables(self, meta_name=None):
        '''
        
        '''
        answer = six.moves.input(u'All data will lost. Are you sure? [y/N] ')

        if answer.strip().lower()!='y':
            sys.exit('Interrupted')

        def _drop_metadata_tables(metadata):
            table = next(six.itervalues(metadata.tables), None)
            if table is None:
                print('Failed to find engine')
            else:
                engine = self.session.get_bind(clause=table)
                drop_everything(engine)
                print('Done')

        if isinstance(self.metadata, MetaData):
            print('Droping tables... ', end='')
            _drop_metadata_tables(self.metadata)
        else:
            for current_meta_name, metadata in self.metadata.items():
                if meta_name not in (current_meta_name, None):
                    continue
                print('Droping tables for {}... '.format(current_meta_name),
                      end='')
                _drop_metadata_tables(metadata)
1095452
public void delete() {
       if (historyId > 0) {
           try {
        	   // ZAP: Support for multiple tags
               staticTableTag.deleteTagsForHistoryID(historyId);
               staticTableHistory.delete(historyId);
               notifyEvent(HistoryReferenceEventPublisher.EVENT_REMOVED);
           } catch (DatabaseException e) {
        	   log.error(e.getMessage(), e);
           }
       }
   }
633562
def delete_archive_file(self):
        
        logger.debug("Deleting %s", self.archive_tmp_dir)
        shutil.rmtree(self.archive_tmp_dir, True)
231015
def get_asset_ddo(self, did):
        
        response = self.requests_session.get(f'{self.url}/{did}').content
        if not response:
            return {}
        try:
            parsed_response = json.loads(response)
        except TypeError:
            parsed_response = None
        except ValueError:
            raise ValueError(response.decode('UTF-8'))
        if parsed_response is None:
            return {}
        return Asset(dictionary=parsed_response)
398620
@Override
  protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    if (null != req.getParameter(KEY_PARAM)) {
      deleteBlob(req, resp);
    } else {
      resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  }
460717
def delete(self, bulk=False):
        
        meta = self._meta
        conn = meta['connection']
        conn.delete(meta.index, meta.type, meta.id, bulk=bulk)