protected function pop(): \Generator
    {
        while (!$this->statements->isEmpty()) {
            $statement = $this->statements->shift();
            \assert($statement instanceof Statement);

            if ($statement->isAlive()) {
                return $statement;
            }
        }

        $statement = yield ($this->prepare)($this->sql);
        \assert($statement instanceof Statement);
        return $statement;
    }