public function flush() : void
    {
        if ($this->bufferSize === 0) {
            return;
        }

        $query = $this->getQuery($this->bufferSize);
        $statement = $this->pdo->prepare($query);
        $statement->execute($this->buffer);
        $this->affectedRows += $statement->rowCount();

        $this->buffer = [];
        $this->bufferSize = 0;
    }
public function flush() : void
    {
        if ($this->bufferSize === 0) {
            return;
        }

        $query = $this->getQuery($this->bufferSize);
        $statement = $this->pdo->prepare($query);
        $statement->execute($this->buffer);
        $this->affectedRows += $statement->rowCount();

        $this->buffer = [];
        $this->bufferSize = 0;
    }
public function flush ( ) : void { if ( $ this -> bufferSize === 0 ) { return ; } $ query = $ this -> getQuery ( $ this -> bufferSize ) ; $ statement = $ this -> pdo -> prepare ( $ query ) ; $ statement -> execute ( $ this -> buffer ) ; $ this -> affectedRows += $ statement -> rowCount ( ) ; $ this -> buffer = [ ] ; $ this -> bufferSize = 0 ; }
Flushes the pending data to the database.

This is to be called once after the last queue() has been processed,
to force flushing the remaining queued operations to the database table.

Do *not* forget to call this method after all the operations have been queued,
or it could result in data loss.

@return void
Flushes the pending data to the database .