## 更新数据
>[info]更新数据,成功返回1,失败返回0
~~~
data = {
'name': 'admin',
'age': 25
}
db.name('user').where('id', 1).update(data)
~~~
>[danger]如果更新数据失败,数据库会自动回滚
- 连接数据库
- 链式操作方法
- distinct
- field
- withoutField
- name
- alias
- force
- join
- leftJoin
- rightJoin
- union
- unionAll
- where
- whereOr
- whereTime
- whereBetweenTime
- whereNotBetweenTime
- whereBetweenTimeField
- whereNotBetweenTimeField
- whereYear
- whereMonth
- whereWeek
- whereDay
- group
- having
- order
- orderRand
- limit
- page
- lock
- comment
- ignore
- inc
- dec
- fetchSql
- 查询数据
- 聚合查询
- 新增数据
- 更新数据
- 删除数据
- 原生操作