## `whereYear`
此方法用于指定查询年数据
## 示例:
>[info] 查询今年注册的用户
~~~
db.name('user').whereYear('addtime').select()
~~~
>[info] 查询去年注册的用户
~~~
db.name('user').whereYear('addtime', 'last year').select()
~~~
>[info] 查询2019年注册的用户
~~~
db.name('user').whereYear('addtime', 2019).select()
~~~
>[danger] `addtime` 必须是时间字段
- 连接数据库
- 链式操作方法
- 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
- 查询数据
- 聚合查询
- 新增数据
- 更新数据
- 删除数据
- 原生操作