如何在 beg orm 中获取 finally sql 字符串
how to get the finally sql string in the beg orm
我想获取beego的orm中finally的sql字符串
但是我找不到可以获取sql字符串的接口。
我想为数据库操作做一个日志。
我想找其他不需要开启的方法orm.Debug。
orm.Debug = false
我想你想使用 orm.Debug
模式:
Setting orm.Debug
to true will print out SQL queries
It may cause performance issues. It's not recommend to be used in production env.
....
Prints to os.Stderr
by default.
You can change it to your own io.Writer
我想获取beego的orm中finally的sql字符串
但是我找不到可以获取sql字符串的接口。
我想为数据库操作做一个日志。
我想找其他不需要开启的方法orm.Debug。
orm.Debug = false
我想你想使用 orm.Debug
模式:
Setting
orm.Debug
to true will print out SQL queriesIt may cause performance issues. It's not recommend to be used in production env.
....
Prints toos.Stderr
by default.You can change it to your own
io.Writer