v2.0.1
BLOB data type
These should now unpack as an ordered array in the Lua runtime (previously, they were indexed by by a string starting from '0').
local function parseBuffer(buffer)
local tbl = {}
for i = 1, #buffer do
tbl[i] = string.char(buffer[i])
end
return table.concat(tbl)
end
MySQL.scalar('SELECT value FROM table', function(result)
result = parseBuffer(result)
print(json.encode(result)
end)Bug Fixes
- Add charset to cast binary and json data correctly #86 (Jaime Filho)
- mysql2/binary_parser: Return BLOB as an array (Linden)
Chores
- Update version (Linden)