想要的sql语句
SELECT `uid`, `nickname`, `avatar`, `create_ip`, INET6_NTOA(UNHEX(create_ip)) AS `ip` FROM `user_info`
attributes
attributes: [
'uid',
'nickname',
'avatar',
[
// 获取ip
sequelize.fn('INET6_NTOA', sequelize.fn('UNHEX', sequelize.literal('create_ip'))),
'ip'
],
],
网友评论