node-db-mysql icon indicating copy to clipboard operation
node-db-mysql copied to clipboard

Unable to read BIT columns values

Open rfrancisco opened this issue 13 years ago • 1 comments

I have a column of type BIT. When using the cast option set to true the result is always '0'. If i disable the cast option the returned value is '\u0000' if the value in the database is set to '0' and '\u0001' if the value is set to '1'. Looks like a bug, can u confirm?

rfrancisco avatar Dec 19 '11 17:12 rfrancisco

I just read that mysql stores the BIT as a TINYINT so the '\u0001' now makes scence to me. But the fact remains that db-node keeps converting the value to '0', even if the returned value is '\u0001'.

rfrancisco avatar Dec 19 '11 17:12 rfrancisco