aboutsummaryrefslogtreecommitdiffstats
path: root/util/sql.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-07-12 17:03:09 +0200
committerKim Alvefur <zash@zash.se>2013-07-12 17:03:09 +0200
commitc41f00e53fd2adcda02df292b98d01cebabfa773 (patch)
tree19fae005b024c60465eda30a7ba3c89464bf56e7 /util/sql.lua
parent3d9b1be698c50b65fe8924d64bcd3da7123dbf9b (diff)
downloadprosody-c41f00e53fd2adcda02df292b98d01cebabfa773.tar.gz
prosody-c41f00e53fd2adcda02df292b98d01cebabfa773.zip
util.sql: Don't fetch row count of result sets for queries that don't have result sets
Diffstat (limited to 'util/sql.lua')
-rw-r--r--util/sql.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/sql.lua b/util/sql.lua
index 771df7aa..475215bb 100644
--- a/util/sql.lua
+++ b/util/sql.lua
@@ -178,7 +178,6 @@ end
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 @@ function engine:execute_update(sql, ...)
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;