当前位置: 代码迷 >> 综合 >> Sequelize attributes 函数嵌套
  详细解决方案

Sequelize attributes 函数嵌套

热度:24   发布时间:2023-12-16 18:17:37.0

想要的sql语句

SELECT `uid`, `nickname`, `avatar`,  `create_ip`, INET6_NTOA(UNHEX(create_ip)) AS `ip` FROM `user_info` 

attributes

      attributes: ['uid','nickname','avatar',[// 获取ipsequelize.fn('INET6_NTOA', sequelize.fn('UNHEX', sequelize.literal('create_ip'))),'ip'], ],
  相关解决方案