public function compileInsert(Builder $query, array $values) {
    foreach($values as &$row) {
      $this->beforePut($row);
    }

    unset($row);

    $this->remapWheres($query);
    $sql = $this->grammar->compileInsert($query, $values);

    if($this->replace_into) {
      $sql = preg_replace('/^insert into/i', 'replace into', $sql);
      $this->replace_into = false;
    }

    return $sql;
  }
public function compileInsert(Builder $query, array $values) {
    foreach($values as &$row) {
      $this->beforePut($row);
    }

    unset($row);

    $this->remapWheres($query);
    $sql = $this->grammar->compileInsert($query, $values);

    if($this->replace_into) {
      $sql = preg_replace('/^insert into/i', 'replace into', $sql);
      $this->replace_into = false;
    }

    return $sql;
  }
public function compileInsert ( Builder $ query , array $ values ) { foreach ( $ values as & $ row ) { $ this -> beforePut ( $ row ) ; } unset ( $ row ) ; $ this -> remapWheres ( $ query ) ; $ sql = $ this -> grammar -> compileInsert ( $ query , $ values ) ; if ( $ this -> replace_into ) { $ sql = preg_replace ( '/^insert into/i' , 'replace into' , $ sql ) ; $ this -> replace_into = false ; } return $ sql ; }
Compile an insert statement into SQL

@param  Builder  $query
@param  mixed[]  $values

@return  string
Compile an insert statement into SQL