コード例 #1
0
ファイル: InsertStatement.php プロジェクト: addiks/phpsql
 /**
  * @see Addiks\PHPSQL.Statement::getIsValid()
  */
 public function validate()
 {
     if (is_array($this->getDataSource())) {
         $columnCount = count($this->getColumns());
         foreach ($this->getDataSource() as $rowIndex => $row) {
             $rowIndex++;
             if (count($row) !== $columnCount) {
                 throw new InvalidArgument("Column-count in row #{$rowIndex} does not match column-count in column-specifier!");
             }
         }
     }
     parent::validate();
 }