Change the Database:query to make the fn optional which will make it more backwards compatible with current code. This fixes an issue with recent movement to the database class in call_forward.lua.

This commit is contained in:
markjcrane 2015-11-10 17:04:42 -07:00
parent 6cc9040787
commit 71ea6a8328
1 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,11 @@ function Database.new(name)
end
function Database:query(sql, fn)
return self._dbh:query(sql, fn)
if (fn == nil) then
return self._dbh:query(sql)
else
return self._dbh:query(sql, fn)
end
end
function Database:first_row(sql)