## 删除数据
>[info]有条件删除数据
~~~
db.name('user').where('id', 1).delete()
~~~
~~~
db.name('user').delete(1)
~~~
~~~
db.name('user').delete([1,2])
~~~
>[info]无条件删除所有数据
~~~
db.name('user').delete(True)
~~~
>[danger]成功返回删除条数,失败返回0,如果删除数据失败,数据库会自动回滚
- 连接数据库
- 链式操作方法
- 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
- 查询数据
- 聚合查询
- 新增数据
- 更新数据
- 删除数据
- 原生操作