public function batchReplace($index, $columns, $rows)
    {
        $params = [];
        $sql = $this->db->getQueryBuilder()->batchReplace($index, $columns, $rows, $params);

        return $this->setSql($sql)->bindValues($params);
    }
public function batchReplace($index, $columns, $rows)
    {
        $params = [];
        $sql = $this->db->getQueryBuilder()->batchReplace($index, $columns, $rows, $params);

        return $this->setSql($sql)->bindValues($params);
    }
public function batchReplace ( $ index , $ columns , $ rows ) { $ params = [ ] ; $ sql = $ this -> db -> getQueryBuilder ( ) -> batchReplace ( $ index , $ columns , $ rows , $ params ) ; return $ this -> setSql ( $ sql ) -> bindValues ( $ params ) ; }
Creates a batch REPLACE command.
For example,

```php
$connection->createCommand()->batchReplace('idx_user', ['name', 'age'], [
['Tom', 30],
['Jane', 20],
['Linda', 25],
])->execute();
```

Note that the values in each row must match the corresponding column names.

@param string $index the index that new rows will be replaced.
@param array $columns the column names
@param array $rows the rows to be batch replaced in the index
@return $this the command object itself
Creates a batch REPLACE command . For example