lua-resty-mysql
lua-resty-mysql copied to clipboard
incorrect type for mysql int/bigint field
db:query("select * from t_batch where id = 1")
i get a row: where: id, orgid become a string
drop table if exists `t_batch`;
create table `t_batch` (
`id` bigint not null auto_increment,
`orgid` bigint not null comment '机构id',
`mid` bigint not null comment '商户id',
`batchno` bigint not null comment '批次号',
`amt` decimal(11,2) null comment '批次汇总金额',
`status` smallint not null default 0 comment '0: 未处理 1:处理完毕',
`deadline` timestamp not null comment '在什么时间之前处理',
`memo` varchar(256) null comment '处理备注',
`tsc` timestamp not null default current_timestamp comment '记录创建时间',
`tsu` timestamp null default current_timestamp on update current_timestamp comment '记录最后修改时间',
primary key (`id`),
unique key key_1 (mid, batchno)
but for smallint , when i get a row. the variable is not string.
Any fix planned? Issue still persists