ali-sdk / ali-rds

Aliyun RDS client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

supportBigNumbers时候where参数的支持问题

wondger opened this issue · comments

当supportBigNumbers开启后,查询出来的bigint会转换成字符串,业务层拿到的也是字符串。

当使用这些bigint字段做其他操作时候可能出现问题,比如 WHERE IN,CASE WHEN THEN的时候无法正常匹配到数据

select('table', {
  where: {
    id: ['882066002862186496', '882066002996400128']
  }
})

实际的调用应该是

select('table', {
  where: {
    id: [882066002862186496, 882066002996400128]
  }
})

目前ali-rds没有对CASE WHEN THEN有包装API来支持,所以这个暂时不用考虑;

重点解决where中字段为数组的情况