Egg: this.app.mysql.literals.now没有被定义

Created on 2 Jan 2018  ·  5Comments  ·  Source: eggjs/egg

default
如图,按照官网文档写法在使用this.app.mysql.literals.now时报错,显示now没有定义,请排查一下。
注释掉截图第35行代码可以正常更新数据库

Most helpful comment

你都有 app.db_guess = app.mysql.get('guess'); 了,对应的就是 app.db_guess.literals

All 5 comments

没有重现 ,能否提供个代码仓库

仓库地址已更新到描述,拜托了

配置里面是 clients, 故 mysql 是多实例的。要 app.mysql.get 后才行吧

你都有 app.db_guess = app.mysql.get('guess'); 了,对应的就是 app.db_guess.literals

原来如此,非常感谢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

popomore picture popomore  ·  3Comments

weijiatan456 picture weijiatan456  ·  3Comments

Webjiacheng picture Webjiacheng  ·  3Comments

kylezhang picture kylezhang  ·  3Comments

lvgg3271 picture lvgg3271  ·  3Comments