Skip to content

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 18 Feb 23:09
· 334 commits to main since this release

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