Delete all rows matched by this result

@return \PDOStatement
340139
function delete() {

        // if this is an association result or it is limited,
        // create specific result for local rows and execute

        if ( $this->parent_ || isset( $this->limitCount ) ) {

            return $this->primaryResult()->delete();

        }

        return $this->db->delete( $this->table, $this->where, $this->whereParams );

    }
976334
public function delete()
    {
        static::checkReadOnly();

        $column = static::SOFT_DELETE;
        if ($column) {
            switch (static::SOFT_DELETE_MODE) {
                case 'deleted':
                    $value = 1;
                    break;

                case 'active':
                    $value = 0;
                    break;

                case 'stamp':
                    $value = static::getCurrentTimestamp();
                    break;

                default:
                    throw new \LogicException(sprintf(
                        "%s has invalid SOFT_DELETE_MODE mode: '%s'",
                        static::class,
                        static::SOFT_DELETE_MODE
                    ));
                    break;
            }
            $this->__set($column, $value);
            if ($this->isFresh()) {
                return true;
            }
            return $this->update($column);
        }

        $database = self::getDatabase();
        $stmt = $database->delete(static::TABLE, $this->getPrimaryKey());
        if ($stmt->rowCount() > 0) {
            ModelManager::remove($this);
            $this->reset();
            return true;
        }

        return false;
    }
264074
public function erase(){
    	if($this->exists())
		{
			$query = new Query(static::table());
			$query->delete()->where($this->getIdentifyCondition());
			if($query->execute())
                $this->clear();
            return $query->success();
		}
        return false;
    }
690391
function delete_all($with_groups = false)
    {
        $this->cache = null;

        $now = $this->db->now();

        $this->db->query("UPDATE " . $this->db->table_name($this->db_name, true)
            . " SET `del` = 1, `changed` = $now"
            . " WHERE `user_id` = ?", $this->user_id);

        $count = $this->db->affected_rows();

        if ($with_groups) {
            $this->db->query("UPDATE " . $this->db->table_name($this->db_groups, true)
                . " SET `del` = 1, `changed` = $now"
                . " WHERE `user_id` = ?", $this->user_id);

            $count += $this->db->affected_rows();
        }

        return $count;
    }
176815
public function delete()
    {

        // Cleanup the corporation
        $this->alliance_history()->delete();
        $this->assets()->delete();
        $this->blueprints()->delete();
        $this->bookmarks()->delete();
        $this->bookmark_folders()->delete();
        $this->contacts()->delete();
        $this->contact_labels()->delete();
        $this->container_logs()->delete();
        $this->contracts()->delete();
        $this->pocos()->delete();
        $this->divisions()->delete();
        $this->facilities()->delete();
        $this->industry_jobs()->delete();

        // TODO: Mining delete

        $this->issued_medals()->delete();
        $this->killmails()->delete();
        $this->medals()->delete();
        $this->member_limit()->delete();
        $this->member_titles()->delete();
        $this->member_tracking()->delete();
        $this->members()->delete();
        $this->orders()->delete();
        $this->roles()->delete();
        $this->role_history()->delete();
        $this->shareholders()->delete();
        $this->standings()->delete();

        // TODO: Starbases & Structures

        $this->titles()->delete();
        $this->title_roles()->delete();
        $this->wallet_balances()->delete();
        $this->wallet_journal()->delete();
        $this->wallet_transactions()->delete();

        return parent::delete();
    }
203162
public function clear()
    {
        try {
            $this->db->from($this->table)->delete();
        } catch (PDOException $e) {
            return false;
        }

        return true;
    }
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);
        }
    }
569105
function delete() {
		$this->table->notify($this, "delete");
		$rowset = $this->table->delete($this->criteria(), "*");
		if (!count($rowset)) {
			throw new \UnexpectedValueException("No row deleted");
		}
		$this->data = $rowset->current()->data;
		return $this->prime();
	}
331227
public function clean()
    {
        $delay = self::OUT_OF_SYNC_TIME_LIMIT;
        $query = $this->pdo->prepare(<<<SQL
DELETE FROM robotstxt__delay0
WHERE delayUntil < ((UNIX_TIMESTAMP() - :delay) * 1000000);
SQL
        );
        $query->bindValue('delay', $delay, \PDO::PARAM_INT);
        return $query->execute();
    }
750454
public function delete(): IResult
    {
        $builder = new DeleteBuilder($this);
        $sql = $builder->build();
        $result = $this->execute($sql);
        $this->__init();
        return $result;
    }
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;
	}
914507
public function deleteAll()
    {
        // Count rows
        $count = $this->count();
        $tmpFile = tempnam("/tmp", uniqid() . '.tmp');
        $tempHandler = fopen($tmpFile, 'w');

        // Write the headings only and right away closes file
        fputcsv($tempHandler, $this->columns, $this->csvDelimiter);
        fclose($tempHandler);

        // Changes the original file to a temporary one.
        if (!rename($tmpFile, $this->filename)) {
            throw new DataStoreException("Failed to write the results to a file.");
        }

        return $count;
    }
247195
public function DeleteStatement()
    {
        $deleteStatement = new AST\DeleteStatement($this->DeleteClause());

        $deleteStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;

        return $deleteStatement;
    }
799684
public function removeAll()
    {
        $classMetaData = $this->entityManager->getClassMetadata($this->getEntityClassName());
        $connection = $this->entityManager->getConnection();
        $databasePlatform = $connection->getDatabasePlatform();
        $truncateTableQuery = $databasePlatform->getTruncateTableSql($classMetaData->getTableName());
        $connection->executeUpdate($truncateTableQuery);
    }
537228
public function delete(): bool
    {
        /**
         * Execute pre-DELETE logic
         */
        $this->beforeDelete();

        $primaryKey = $this->getPrimaryKey();

        /**
         * Execute the DELETE (this may throw an exception)
         */
        $table = $this->getTable();
        $result = $table::delete($primaryKey);

        /**
         * Execute post-DELETE logic
         */
        $this->afterDelete();

        /**
         * Reset all fields to null to indicate that the row is not there
         */
        $this->resetArray();

        return $result > 0;
    }
620956
public function delete() {
        $query = new DeleteQuery($this->getTable());
        $query->whereConditionGroup($this->getWhereConditionGroup());
        return $this->connection->exec($query);
    }
1040453
public function delete()
	{
		//build the delete query string
		$sql = $this->buildDelete();

		//set the value of the query_string
		$this->responseObject->setQueryString($sql);

		//time query execution
		$query_start_time = microtime(true);

		//execute the query string
		$result = $this->connector->execute($sql);

		$query_stop_time = microtime(true);
		$query_excec_time = $query_stop_time - $query_start_time;
		$this->responseObject->setQueryTime($query_excec_time);

		//put this in try...catch block for better error handling
		try{

			//throw error if there was an error perfrorming this query
			if ( $result === false ) 
			{
				//throw excepton
				throw new MySQLException(get_class(new MySQLException) . ' ' .$this->connector->lastError() . '<span class="query-string"> (' . $sql . ') </span>');
				
			}
			
		}

		//diplay error message
		catch(MySQLException $MySQLExceptionObject){

			//display error message
			$MySQLExceptionObject->errorShow();

		}


		//if delete was successfull, get and return the number of affected rows
		$this->responseObject
			->setAffectedRows($this->connector->affectedRows());

		return $this->responseObject;

	}