Delete all mappings by type.

@param string $type
Mapping type.
@param int $chunk_size
Chunk size.
198352
public function deleteAllMappingsByType($type, $chunk_size = 25) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', $type)
      ->execute();

    if (!$ids) {
      return;
    }

    $chunks = array_chunk($ids, $chunk_size);
    foreach ($chunks as $chunk) {
      $entities = $this->storageMapping->loadMultiple($chunk);
      $this->storageMapping->delete($entities);
    }
  }
959804
public void deleteBulkDocsAsync(String index, String type,
            QueryBuilder filterQueryBuilder,
            ActionListener<BulkResponse> bulkResponseActionListener) {
        executeBulkRequestAsync(
                buildDeleteBulkRequestBuilder(
                        buildExtractDeleteRequestBuilderList(index, type,
                                filterQueryBuilder)),
                bulkResponseActionListener);
    }
56789
public function clear($type)
    {
        if ($type == self::TYPE_ALL) {
            $indexes = $this->getAllIndexes();
        } else {
            $indexes = $this->getIndexes($type);
        }

        foreach ($indexes as $index) {
            $index->clear();
        }
    }
980712
@Override
	public synchronized void delete(int type, String url) throws DatabaseException {
    	try {
			psDeleteUrls.setInt(1, type);
			psDeleteUrls.setString(2, url);
			psDeleteUrls.executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }
600512
public function removeAllByChunks(EntityStorageInterface $storage, array $ids, $chunkSize = 10) {
    // Set appropriate chunk size.
    $default_chunk_size = 10;
    if ((int) $chunkSize <= 0) {
      $chunkSize = $default_chunk_size;
    }
    if (empty($ids)) {
      return;
    }
    $chunks = array_chunk($ids, $chunkSize);
    foreach ($chunks as $chunk) {
      $entities = $storage->loadMultiple($chunk);
      $storage->delete($entities);
    }
  }
400349
public function deleteByQuery($query, $type)
    {
        $result = $this->client->request(
            'DELETE',
            "/{$this->indexName}/{$type}/_query",
            new Message(
                array(
                    'Content-Type' => 'application/json',
                ),
                $query
            )
        );
        $this->flush();
    }
1040476
protected function removeAllItems($type) {
        $names = [];
        $query = (new Query)
            ->select(['name'])
            ->from($this->itemTable)
            ->where(['type' => $type]);
        foreach ($query->all($this->db) as $row) {
            $names[] = $row['name'];
        }

        if (empty($names)) {
            return;
        }
        $key = $type == Item::TYPE_PERMISSION ? 'child' : 'parent';
        $this->db->getCollection($this->itemChildTable)->remove([$key => $names]);
        $this->db->getCollection($this->assignmentTable)->remove(['item_name' => $names]);
        $this->db->getCollection($this->itemTable)->remove(['type' => $type]);
    }
1339609
public function deleteThumbnail($type)
    {
        $app = Application::getFacadeApplication();
        $config = $app->make('config');
        if (!($type instanceof ThumbnailTypeVersion)) {
            $type = ThumbnailTypeVersion::getByHandle($type);
        }
        $fsl = $this->getFile()->getFileStorageLocationObject()->getFileSystemObject();
        $path = $type->getFilePath($this);
        try {
            if ($fsl->has($path)) {
                $fsl->delete($path);

                $app['director']->dispatch('on_thumbnail_delete',
                    new \Concrete\Core\File\Event\ThumbnailDelete($path, $type)
                );
            }
        } catch (FileNotFoundException $e) {
        }
        if ($type->getHandle() == $config->get('concrete.icons.file_manager_listing.handle') && $this->fvHasListingThumbnail) {
            $this->fvHasListingThumbnail = false;
            $this->save();
        }
        if ($type->getHandle() == $config->get('concrete.icons.file_manager_detail.handle') && $this->fvHasDetailThumbnail) {
            $this->fvHasDetailThumbnail = false;
            $this->save();
        }
    }
573643
function remove_type($type=null)
    {
        if (!isset($type)) {
            $this->mime_types = array();
            return;
        }
        $slash_pos = strpos($type, '/');
        if (!$slash_pos) return;

        $type_info = array('last_match'=>false, 'wildcard'=>false, 'type'=>$type);
        if (substr($type, $slash_pos) == '/*') {
            $type_info['wildcard'] = true;
            $type_info['type'] = substr($type, 0, $slash_pos);
        }
        $this->scan(array(&$this, '_remove_type_callback'), $type_info);
    }
97528
def delete(self, block_type, block_num):
        
        logger.info("deleting block")
        blocktype = snap7.snap7types.block_types[block_type]
        result = self.library.Cli_Delete(self.pointer, blocktype, block_num)
        return result
895152
def purge_cache(self, object_type):
        
        if object_type in self.mapping:
            cache = self.mapping[object_type]
            log.debug("Purging [{}] cache of {} values.".format(object_type, len(cache)))
            cache.purge()
18822
public function saveToCache($type, $slotname, $version, ChunkModel $chunk = null)
    {
        $key = $this->getCacheKey($type, $slotname, $version);

        $this->cache->forever($key, $chunk);
    }
304981
public function removeMappedType($type)
    {
        if (!$this->hasMappedType($type)) {
            throw PlatformException::mappedTypeDoesNotExist($type);
        }

        unset($this->mappedTypes[$type]);
    }
1032175
@DELETE
    @Path("/typedefs")
    @Consumes(Servlets.JSON_MEDIA_TYPE)
    @Produces(Servlets.JSON_MEDIA_TYPE)
    @Experimental
    public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
        AtlasPerfTracer perf = null;

        try {
            if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
                perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.deleteAtlasTypeDefs(" +
                                                               AtlasTypeUtil.toDebugString(typesDef) + ")");
            }

            typeDefStore.deleteTypesDef(typesDef);
        } finally {
            AtlasPerfTracer.log(perf);
        }
    }
834206
public void deleteBulkDocsAsync(List<String> indexList,
            List<String> typeList, QueryBuilder filterQueryBuilder) {
        indexList.forEach(index -> typeList.forEach(
                type -> deleteBulkDocsAsync(index, type, filterQueryBuilder)));
    }
1176736
public function wipe($type) {
		$table = $type;
		$table = $this->safeTable($table);
		$sql = "TRUNCATE $table CASCADE";
		$this->adapter->exec($sql);
	}
1329929
@Override
	public synchronized void deleteAllUrlsForType(int type) throws DatabaseException {
    	SqlPreparedStatementWrapper psDeleteAllUrlsForType = null;
        try {
        	psDeleteAllUrlsForType = DbSQL.getSingleton().getPreparedStatement("sessionurl.ps.deleteurlsfortype");
			psDeleteAllUrlsForType.getPs().setInt(1, type);
			psDeleteAllUrlsForType.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psDeleteAllUrlsForType);
		}
    }