Software /
code /
prosody
Changeset
5742:3c57c2281087
util.sql: Don't fetch row count of result sets for queries that don't have result sets
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 12 Jul 2013 17:03:09 +0200 |
parents | 5741:c7a664e496b3 |
children | 5743:8363dda76155 |
files | util/sql.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sql.lua Fri Jul 12 02:53:24 2013 +0200 +++ b/util/sql.lua Fri Jul 12 17:03:09 2013 +0200 @@ -178,7 +178,6 @@ local result_mt = { __index = { affected = function(self) return self.__affected; end; - rowcount = function(self) return self.__rowcount; end; } }; function engine:execute_query(sql, ...) @@ -200,7 +199,7 @@ prepared[sql] = stmt; end assert(stmt:execute(...)); - return setmetatable({ __affected = stmt:affected(), __rowcount = stmt:rowcount() }, result_mt); + return setmetatable({ __affected = stmt:affected() }, result_mt); end engine.insert = engine.execute_update; engine.select = engine.execute_query;