# mysql.binds

## 功能

追加多行批量绑定参数。

## 语法

```bt
mysql(dsn).query(sql).binds(rows)
```

## 参数

| 参数 | 类型 | 必填 | 默认值 | 说明 |
| ------ | ------ | ------ | ------ | ------ |
| rows | Array | 是 | 无 | 二维数组；每一行是一组绑定值。 |

## 返回值

| 类型 | 说明 |
| ------ | ------ |
| Mysql | 返回新的 MySQL 查询构建器。 |

## 示例

```bt
rows = [['A', 18], ['B', 20]]
db = mysql('mysql://user:pass@127.0.0.1/test')
result = db.query('insert into user(name, age) values (?, ?)').binds(rows).sql()

// 输出：insert into user(name, age) values ('A', 18), ('B', 20) /* binds: 2 rows, batch: 0, workers: 1 */
print result
```

## 注意事项

- binds 缺少参数或参数不是二维数组时会报错。
- all() 和 one() 不支持 binds。
