Removes every entries in the trash.
Will NOT remove associated content objects nor attributes.

Basically truncates ezcontentobject_trash table.
438910
public function cleanupTrash()
    {
        $query = $this->handler->createDeleteQuery();
        $query->deleteFrom('ezcontentobject_trash');
        $query->prepare()->execute();
    }
1113360
def flush(self, table):
        '''
        
        '''
        table_path = os.path.join(self.db_path, table)
        if os.path.exists(table_path):
            os.unlink(table_path)
123441
def _PurgeTable(self, tableName):
    
    goodlogging.Log.Info("DB", "Deleting all entries from table {0}".format(tableName), verbosity=self.logVerbosity)
    self._ActionDatabase("DELETE FROM {0}".format(tableName))
847464
public function cleanUp() {
        unset($this->pdfdata);
        $this->pdfdata = '';
        unset($this->objstreams);
        $this->objstreams = array();
        unset($this->objects);
        $this->objects = array();
        unset($this->objstreamobjs);
        $this->objstreamobjs = array();
        unset($this->xref);
        $this->xref = array();
        unset($this->objoffsets);
        $this->objoffsets = array();
        unset($this->pages);
        $this->pages = array();
    }
1172859
function cleanUpModel(bbDocumentModel) {
    var x;
    for (x in bbDocumentModel) {
        if (Object.keys(bbDocumentModel[x]).length === 0) {
            delete bbDocumentModel[x];
        }
    }
    var data = bbDocumentModel.data;
    for (x in data) {
        if (Object.keys(data[x]).length === 0) {
            delete data[x];
        }
    }
}
1168753
def clean(self):
        
        self._table.clear()
        for item in self._usage_recency:
            self._usage_recency.remove(item)
334658
def delete_garbage(self):
        
        self.connection.query(
            "DELETE FROM `{db}`.`{tab}` WHERE ".format(tab=self.table_name, db=self.database) +
            " AND ".join(
                'hash NOT IN (SELECT {column_name} FROM {referencing_table})'.format(**ref)
                for ref in self.references) or "TRUE")
        print('Deleted %d items' % self.connection.query("SELECT ROW_COUNT()").fetchone()[0])
474403
static function cleanup()
    {
        $db = eZDB::instance();
        $db->begin();
        $db->query( "DELETE FROM ezcollab_item" );
        $db->query( "DELETE FROM ezcollab_item_group_link" );
        $db->query( "DELETE FROM ezcollab_item_message_link" );
        $db->query( "DELETE FROM ezcollab_item_participant_link" );
        $db->query( "DELETE FROM ezcollab_item_status" );
        $db->query( "DELETE FROM ezcollab_notification_rule" );
        $db->query( "DELETE FROM ezcollab_profile" );
        $db->query( "DELETE FROM ezcollab_simple_message" );
        $db->commit();
    }
789678
static function removeTemporary()
    {
        $version = eZContentClass::VERSION_STATUS_TEMPORARY;
        $temporaryClasses = eZContentClass::fetchList( $version, true );
        $db = eZDB::instance();
        $db->begin();
        foreach ( $temporaryClasses as $class )
        {
            $class->remove( true, $version );
        }
        eZPersistentObject::removeObject( eZContentClassAttribute::definition(),
                                          array( 'version' => $version ) );

        $db->commit();
    }
281518
public function deleteContent()
  {
    $files = glob($this->folderPath . '*');
    foreach ($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }
900009
function removeAttributes( $removeAttributes = false, $version = false )
    {
        if ( is_array( $removeAttributes ) )
        {
            $db = eZDB::instance();
            $db->begin();
            foreach( $removeAttributes as $attribute )
            {
                $attribute->removeThis();
            }
            $db->commit();
        }
        else
        {
            $contentClassID = $this->ID;

            if ( $version === false )
            {
                $version = $this->Version;
            }
            $classAttributes = $this->fetchAttributes( );

            $db = eZDB::instance();
            $db->begin();
            foreach ( $classAttributes as $classAttribute )
            {
                $dataType = $classAttribute->dataType();
                if ( $dataType === null )
                {
                    eZDebug::writeError(
                        "Skipping removal of class attribute for non-existent datatype " . $classAttribute->DataTypeString,
                        __METHOD__
                    );
                    continue;
                }
                $dataType->deleteStoredClassAttribute( $classAttribute, $version );
            }
            eZPersistentObject::removeObject( eZContentClassAttribute::definition(),
                                              array( 'contentclass_id' => $contentClassID,
                                                     'version' => $version ) );
            $db->commit();
        }
    }
923541
public function deleteEntry()
    {
        $sOxId = $this->getEditObjectId();
        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        if ($sOxId && $oArticle->load($sOxId)) {
            parent::deleteEntry();
        }
    }
1329046
def remove(self, obj):
        
        named = self.contents.get(obj.name.lower())
        if named:
            try:
                named.remove(obj)
                if len(named) == 0:
                    del self.contents[obj.name.lower()]
            except ValueError:
                pass
576358
public void clear()
    {
        // clear out ref queue. We don't need to expunge entries
        // since gc'ed entries won't get copied.
        emptyReferenceQueue();

        for (int i = 0; i < table.length; i++)
        {
            Entry e = table[i];
            Entry first = null;
            Entry prev = null;
            while (e != null)
            {
                Object candidate = e.get();
                if (candidate != null)
                {
                    Entry dirty = e.makeDirtyAndWeak(queue);
                    if (first == null)
                    {
                        first = dirty;
                    }
                    if (prev != null)
                    {
                        prev.setNext(dirty);
                    }
                    prev = dirty;
                }
                else
                {
                    if (prev != null)
                    {
                        prev.setNext(e.getState().next);
                    }
                    size--;
                }
                e = e.getState().next;
            }
            table[i] = first;
        }

        // Allocation of array may have caused GC, which may have caused
        // additional entries to go stale.  Removing these entries from the
        // reference queue will make them eligible for reclamation.
        expungeStaleEntries();
    }
136601
public function wipeAll() {
		foreach($this->getTables() as $t) {
			foreach($this->getKeys($t) as $k) {
				$this->adapter->exec("ALTER TABLE \"{$k['FKTABLE_NAME']}\" DROP FOREIGN KEY \"{$k['FK_NAME']}\"");
			}
			$this->adapter->exec("DROP TABLE \"$t\"");
		}
		
	}
688774
def flush(self):
        
        annotation = self.get_annotation()
        if annotation.get(ATTACHMENTS_STORAGE) is not None:
            del annotation[ATTACHMENTS_STORAGE]
129207
static function cleanup()
    {
        $db = eZDB::instance();
        $sql = "SELECT productcollection_id FROM ezbasket";
        $limit = self::ITEM_LIMIT;

        $db->begin();
        do
        {
            $rows = $db->arrayQuery( $sql, array( 'offset' => 0, 'limit' => $limit ) );

            if ( count( $rows ) == 0 )
                break;

            $productCollectionIDList = array();
            foreach ( $rows as $row )
            {
                $productCollectionIDList[] = (int)$row['productcollection_id'];
            }
            eZProductCollection::cleanupList( $productCollectionIDList );

            $ids = implode( ', ', $productCollectionIDList );
            $db->query( "DELETE FROM ezbasket WHERE productcollection_id IN ( $ids )" );
        }
        while ( true );
        $db->commit();
    }