Delete this record

@return void
172231
public function deleteRecord(): void
    {
        // Create a pending change
        if (!$this->isPendingDeletion()) {
            DB::table('change')->insert([
                'gedcom_id'  => $this->tree->id(),
                'xref'       => $this->xref,
                'old_gedcom' => $this->gedcom(),
                'new_gedcom' => '',
                'user_id'    => Auth::id(),
            ]);
        }

        // Auto-accept this pending change
        if (Auth::user()->getPreference('auto_accept')) {
            FunctionsImport::acceptAllChanges($this->xref, $this->tree);
        }

        // Clear the cache
        self::$gedcom_record_cache  = [];
        self::$pending_record_cache = [];

        Log::addEditLog('Delete: ' . static::RECORD_TYPE . ' ' . $this->xref, $this->tree);
    }
425848
public function delete(){

        $query= /** @lang text */
            'DELETE FROM '.self::sanitize(static::$table);


        if (!empty($this->whereby)) {

            $query = $query . ' WHERE ' . $this->whereby;
        }

        try {
            $this->exec($query);

            static::$response["status"] = "success";
            static::$response["response"] = 'success';
            static::$response['code'] = 200;
            return static::terminate(static::$response);
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response['code'] = $e->getCode();
            return static::terminate(static::$response);
        }
    }
1286611
public function delete()
    {
        Connection::sendCurlRequest(Connection::URL_DEVICES . '/' . $this->iden, 'DELETE', null, false,
            $this->apiKey);
    }
884215
public function delete()
	{
		// Can't delete what doesn't exist
		if (!$this->exists())
		{
			return true;
		}

		// Remove record from the database
		if (!$this->_tbl->delete())
		{
			$this->setError($this->_tbl->getError());
			return false;
		}

		// Hey, no errors!
		return true;
	}
1204150
public function delete()
	{
		parent::delete();

		$item = $this->getView()->item;
		$fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' );

		foreach( $item->getListItems( 'attribute', 'hidden', 'download', false ) as $listItem )
		{
			$refItem = $listItem->getRefItem();

			if( $refItem !== null && $refItem->getCode() != '' && $fs->has( $refItem->getCode() ) ) {
				$fs->rm( $refItem->getCode() );
			}

			$item->deleteListItem( 'attribute', $listItem, $refItem );
		}
	}
336119
public function delete()
	{
		parent::delete();

		$item = $this->getView()->item;
		$cntl = \Aimeos\Controller\Common\Media\Factory::create( $this->getContext() );

		foreach( $item->getListItems( 'media', null, null, false ) as $listItem )
		{
			if( ( $refItem = $listItem->getRefItem() ) !== null ) {
				$cntl->delete( $refItem );
			}

			$item->deleteListItem( 'media', $listItem, $refItem );
		}
	}
671563
public function delete()
    {
        try {
            parent::delete();
            $query = 'DELETE FROM ' . $this->table . ' WHERE userID = ?';
            $stmt = $this->pdo->prepare($query);
            $stmt->execute(array($this->userID));
            return $stmt->rowCount() > 0;
        } catch(\PDOException $e) {
            return false;
        }
    }
487843
public function delete()
    {
        if (!$this->ID) {
            return false;
        }

        try {
            global $wpdb;
            $sql = 'DELETE FROM ' . static::getTableName() . ' WHERE ' . static::$PK . ' = %d';

            return $wpdb->query($wpdb->prepare($sql, $this->ID));
        } catch (Exception $e) {
            return false;
        }
    }
783907
public function delete()
    {
        if (!userHasPermission('admin:blog:category:' . $this->blog->id . ':delete')) {

            unauthorised();
        }

        // --------------------------------------------------------------------------

        $id = $this->uri->segment(6);

        if ($this->blog_category_model->delete($id)) {

            $this->session->set_flashdata('success', 'Category was deleted successfully.');

        } else {

            $status   = 'error';
            $message  = 'There was a problem deleting the Category. ';
            $message .= $this->blog_category_model->lastError();
            $this->session->set_flashdata($status, $message);
        }

        redirect('admin/blog/category/index/' . $this->blog->id . $this->isModal);
    }
719088
public function delete()
    {
        $this->getContext()->invokeApiPost('DOMAIN', [
            'delete' => true,
            'confirmed' => true,
            'select0' => $this->domainName,
        ]);
        $this->owner->clearCache();
    }
156537
public function delete()
    {
        $where = [static::$primary_key => $this->getPrimaryKey()];

        $this->connection->delete(static::$table, $where);
        $this->setStored(false);

        return $this;
    }
43057
public function delete() {
		if ($this->dbId()) {
			$this->db()->query('DELETE FROM `'.$this->table().'` WHERE `'.$this->idVar().'` = ?', [$this->dbId()]);
		} else {
			throw new Exception('Cannot delete. No ID was given.');
		}
		return $this;
	}
353324
public function delete() {
        if ($this->_oldFile != $this->path . $this->name) {
            unlink($this->_oldFile);
        }

        unlink($this->path . $this->name);
    }
337071
public function delete()
    {
        $where = $this->_getWhereQuery();

        /**
         * Execute the DELETE (this may throw an exception)
         */
        $result = $this->_getTable()->delete($where);

        /**
         * Reset all fields to null to indicate that the row is not there
         */
        $this->_data = array_combine(
            array_keys($this->_data),
            array_fill(0, count($this->_data), null)
        );

        return $result;
    }
1355354
public function delete(): bool
    {
        if (! $this->exists())
        {
            return false;
        }

        $sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE ' . $this->getKeyName() . ' = :key';
        $query = DB::getConnection()->prepare($sql);

        return $query->execute(['key' => $this->getKey()]);
    }
733434
public function delete() {
        global $DB;

        $this->delete_attachments();
        $this->remove_associations();

        // Get record to pass onto the event.
        $record = $DB->get_record('post', array('id' => $this->id));
        $DB->delete_records('post', array('id' => $this->id));
        core_tag_tag::remove_all_item_tags('core', 'post', $this->id);

        $event = \core\event\blog_entry_deleted::create(array(
            'objectid'      => $this->id,
            'relateduserid' => $this->userid
            ));
        $event->add_record_snapshot("post", $record);
        $event->set_blog_entry($this);
        $event->trigger();
    }
1346584
public function delete() 
	{
		$settings = static::_model();

		$result = DB::delete( $settings['table'] )
			->where( $settings['primary_key'], $this->_data_store[$settings['primary_key']] )
			->limit(1)
			->run( $settings['handler'] );

		$this->_data_store[$cache['primary_key']] = null;

		return $result;
	}