unimportant

This commit is contained in:
Cosmin Apreutesei 2020-03-21 13:30:15 +02:00
parent afadb60a14
commit 720d2a3955
1 changed files with 3 additions and 4 deletions

View File

@ -665,12 +665,11 @@ function res.fetch(res, mode, t)
local field_count = C.mysql_num_fields(res) local field_count = C.mysql_num_fields(res)
local fields = fetch_fields and C.mysql_fetch_fields(res) local fields = fetch_fields and C.mysql_fetch_fields(res)
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {}) local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
if not row then return nil end
if packed then if packed then
return row return row
elseif row then
return true, unpack(row)
else else
return true return true, unpack(row)
end end
end end
@ -682,7 +681,7 @@ function res.rows(res, mode, t)
res:seek(1) res:seek(1)
return function() return function()
local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {}) local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {})
if not row then return end if not row then return nil end
i = i + 1 i = i + 1
if packed then if packed then
return i, row return i, row