Deletes blob references for the given signed binary from the DB.
779031
def DeleteSignedBinaryReferences(self,
                                   binary_id,
                                   cursor=None):
    """"""
    cursor.execute(
        """
      DELETE FROM signed_binary_references
      WHERE binary_type = %s AND binary_path_hash = %s
    """, [
        binary_id.binary_type.SerializeToDataStore(),
        mysql_utils.Hash(binary_id.path)
    ])
4234
def remove_external_references(self):
        
        for ex_ref_node in self.node.findall('externalReferences'):
            self.node.remove(ex_ref_node)
185702
public void clear() {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        if (bTrace && tc.isEntryEnabled()) {
            Tr.entry(tc, "clear");
        }

        clearAllHeaders();
        this.eohPosition = HeaderStorage.NOTSET;
        this.currentElem = null;
        this.stateOfParsing = PARSING_CRLF;
        this.binaryParsingState = GenericConstants.PARSING_HDR_FLAG;
        this.parsedToken = null;
        this.parsedTokenLength = 0;
        this.bytePosition = 0;
        this.byteLimit = 0;
        this.currentReadBB = null;
        clearBuffers();
        this.debugContext = this;
        this.numCRLFs = 0;
        this.bIsMultiLine = false;
        this.lastCRLFBufferIndex = HeaderStorage.NOTSET;
        this.lastCRLFPosition = HeaderStorage.NOTSET;
        this.lastCRLFisCR = false;
        this.headerChangeCount = 0;
        this.headerAddCount = 0;
        this.bOverChangeLimit = false;
        this.compactHeaderFlag = false;
        this.table = null;
        this.isPushPromise = false;
        this.processedXForwardedHeader = false;
        this.processedForwardedHeader = false;
        this.forwardHeaderErrorState = false;
        this.forwardedByList = null;
        this.forwardedForList = null;
        this.forwardedHost = null;
        this.forwardedPort = null;
        this.forwardedProto = null;

        if (bTrace && tc.isEntryEnabled()) {
            Tr.exit(tc, "clear");
        }
    }
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }
746074
void removeNonExistingSystemEntityTypes() {
    // get all system entities
    List<EntityType> removedSystemEntityMetas =
        dataService
            .findAll(ENTITY_TYPE_META_DATA, EntityType.class)
            .filter(EntityTypeUtils::isSystemEntity)
            .filter(this::isNotExists)
            .collect(toList());

    dataService.getMeta().deleteEntityType(removedSystemEntityMetas);
    removedSystemEntityMetas.forEach(
        entityType ->
            mutableAclClassService.deleteAclClass(EntityIdentityUtils.toType(entityType)));
  }
949935
def clear(self):
        
        # The del_binfo() call here isn't necessary for normal execution,
        # but is for interactive mode, where we might rebuild the same
        # target and need to start from scratch.
        self.del_binfo()
        self.clear_memoized_values()
        self.ninfo = self.new_ninfo()
        self.executor_cleanup()
        try:
            delattr(self, '_calculated_sig')
        except AttributeError:
            pass
        self.includes = None
1208269
def clean_blobstore_cache(self):
        """"""
        url = self.api_url + self.blobstores_builpack_cache_url
        resp, rcode = self.request('DELETE', url)
        if rcode != 202:
            raise CFException(resp, rcode)
        return resp
599085
def wipe(self):
        
        try:
            if os.isfile(self._dbpath):
                os.remove(self._dbpath)
        except OSError:
            pass
1116427
def unregister(self, obj=None):
        
        if obj is None:
            self.__databases.clear()
            self.__schemas.clear()
        elif isinstance(obj, orb.Schema):
            self.__schemas.pop(obj.name(), None)
        elif isinstance(obj, orb.Database):
            if obj == self.__current_db:
                self.__current_db = None
            self.__databases.pop(obj.name(), None)
        else:
            self.__current_db = None
            self.__schemas.pop(obj, None)
            self.__databases.pop(obj, None)
393581
def clear(self):
        
        codec.Context.clear(self)

        self.strings.clear()
        self.proxied_objects = {}
        self.classes = {}
        self.class_ref = {}

        self.class_idx = 0
593067
def _cleanup(self):
        '''
        
        '''
        self._declare_cb = None
        self._delete_cb = None
        super(ExchangeClass, self)._cleanup()
438391
def __delete_internal_blob(self, key):
        ''' 
        '''
        with self.get_conn() as conn:
            conn.isolation_level = None
            try:
                c = conn.cursor()
                c.execute("BEGIN")
                if key is None:
                    c.execute("DELETE FROM cache_entries WHERE key IS NULL")
                    c.execute("DELETE FROM blob_entries WHERE KEY IS NULL")
                else:
                    c.execute("DELETE FROM cache_entries WHERE key = ?", (key,))
                    c.execute("DELETE FROM blob_entries WHERE KEY = ?", (key,))
                c.execute("COMMIT")
            except:
                getLogger().debug("Cannot delete")
                return False
            return True
924368
public static function cleanupDatabase()
    {
        // Grab any extensions sitting in the database
        $rows = Symphony::Database()->fetch("SELECT `name` FROM `tbl_extensions`");

        // Iterate over each row
        if (is_array($rows) && !empty($rows)) {
            foreach ($rows as $r) {
                $name = $r['name'];
                $status = isset($r['status']) ? $r['status'] : null;

                // Grab the install location
                $path = self::__getClassPath($name);
                $existing_id = self::fetchExtensionID($name);

                // If it doesnt exist, remove the DB rows
                if (!@is_dir($path)) {
                    Symphony::Database()->delete("tbl_extensions_delegates", sprintf(" `extension_id` = %d ", $existing_id));
                    Symphony::Database()->delete('tbl_extensions', sprintf(" `id` = %d LIMIT 1", $existing_id));
                } elseif ($status == 'disabled') {
                    Symphony::Database()->delete("tbl_extensions_delegates", sprintf(" `extension_id` = %d ", $existing_id));
                }
            }
        }
    }
1253355
private void deleteFromIndices(ApiType oldObj, String key) {
    for (Map.Entry<String, Function<ApiType, List<String>>> indexEntry : this.indexers.entrySet()) {
      Function<ApiType, List<String>> indexFunc = indexEntry.getValue();
      List<String> indexValues = indexFunc.apply(oldObj);
      if (io.kubernetes.client.util.common.Collections.isEmptyCollection(indexValues)) {
        continue;
      }

      Map<String, Set<String>> index = this.indices.get(indexEntry.getKey());
      if (index == null) {
        continue;
      }
      for (String indexValue : indexValues) {
        Set<String> indexSet = index.get(indexValue);
        if (indexSet != null) {
          indexSet.remove(key);
        }
      }
    }
  }
955538
public void free()
    {
        this.setPDatabaseParent(null); // Remove from database
        
        Object[] keys = m_htTableList.keySet().toArray();
        for (int i = 0; i < keys.length; i++)
        { 
            Object key = keys[i];
            PTable pTable = m_htTableList.get(key);
            if (pTable != null)
                pTable.free();      // This can be dangerous if the PhysicalTables still have references to the PTables
        } 
        m_htTableList.clear();
        m_htTableList = null;
        this.close();
    }
1355412
def _cleanup(self, ref):
        ''
        self.transitor_states[self._weakref_holder[ref]] -= 1
        del self._weakref_holder[ref]