From 84b48a123cf75fc82b0936cdafe8d48b43b14bcc Mon Sep 17 00:00:00 2001 From: ubaldus Date: Tue, 20 Nov 2018 12:19:23 +0000 Subject: [PATCH] Add a metatable with ordered column names --- lib/resty/mysql.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/resty/mysql.lua b/lib/resty/mysql.lua index ad0562d..b28dfcd 100644 --- a/lib/resty/mysql.lua +++ b/lib/resty/mysql.lua @@ -927,6 +927,8 @@ local function read_result(self, est_nrows) end self.state = STATE_CONNECTED + + setmetatable(rows,cols) return rows end