private function validate()
    {
        if (!$this->table) {
            throw new BatchInsertException('Batch Table must be defined');
        }

        $requiredCount = count($this->rows);

        if ($requiredCount == 0) {
            throw new BatchInsertException('Batch Rows cannot be empty');
        }

        foreach ($this->values as $value) {
            if (count($value) !== $requiredCount) {
                throw new BatchInsertException('Batch Values must match the same column count of ' . $requiredCount);
            }
        }
    }
private function validate()
    {
        if (!$this->table) {
            throw new BatchInsertException('Batch Table must be defined');
        }

        $requiredCount = count($this->rows);

        if ($requiredCount == 0) {
            throw new BatchInsertException('Batch Rows cannot be empty');
        }

        foreach ($this->values as $value) {
            if (count($value) !== $requiredCount) {
                throw new BatchInsertException('Batch Values must match the same column count of ' . $requiredCount);
            }
        }
    }
private function validate ( ) { if ( ! $ this -> table ) { throw new BatchInsertException ( 'Batch Table must be defined' ) ; } $ requiredCount = count ( $ this -> rows ) ; if ( $ requiredCount == 0 ) { throw new BatchInsertException ( 'Batch Rows cannot be empty' ) ; } foreach ( $ this -> values as $ value ) { if ( count ( $ value ) !== $ requiredCount ) { throw new BatchInsertException ( 'Batch Values must match the same column count of ' . $ requiredCount ) ; } } }
Validates the data before calling SQL
@return void
@throws \Exception
Validates the data before calling SQL