public function delete(): int
    {
        try {
            $query = (clone $this)->setDelete()->apply($this->database->getTablePrefixer());
            $compiled = $this->database->getGrammar()->compileDelete($query);
            return $this->database->delete($compiled->getSQL(), $compiled->getBindings());
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }