aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql2.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-06-24 22:55:41 +0100
committerMatthew Wild <mwild1@gmail.com>2015-06-24 22:55:41 +0100
commitd6f89f59be5f5e26977a58b3c6a758d124c2171a (patch)
tree7d726c28715aa7673016f391e61cd55af122f0bd /plugins/mod_storage_sql2.lua
parent7413f8bab97af104f0a28431538eb9f93a4f7b1c (diff)
downloadprosody-d6f89f59be5f5e26977a58b3c6a758d124c2171a.tar.gz
prosody-d6f89f59be5f5e26977a58b3c6a758d124c2171a.zip
mod_storage_sql2: Some reformatting and variable name improvements
Diffstat (limited to 'plugins/mod_storage_sql2.lua')
-rw-r--r--plugins/mod_storage_sql2.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index 74f95417..f14d32ec 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -197,7 +197,7 @@ end
local keyval_store = {};
keyval_store.__index = keyval_store;
function keyval_store:get(username)
- user,store = username,self.store;
+ user, store = username, self.store;
local ok, result = engine:transaction(keyval_store_get);
if not ok then return ok, result; end
return result;
@@ -361,13 +361,13 @@ function driver:open(store, typ)
end
function driver:stores(username)
- local sql = "SELECT DISTINCT `store` FROM `prosody` WHERE `host`=? AND `user`" ..
+ local query = "SELECT DISTINCT `store` FROM `prosody` WHERE `host`=? AND `user`" ..
(username == true and "!=?" or "=?");
if username == true or not username then
username = "";
end
local ok, result = engine:transaction(function()
- return engine:select(sql, host, username);
+ return engine:select(query, host, username);
end);
if not ok then return ok, result end
return iterator(result);
@@ -376,7 +376,7 @@ end
function driver:purge(username)
return engine:transaction(function()
local stmt,err = engine:delete("DELETE FROM `prosody` WHERE `host`=? AND `user`=?", host, username);
- return true,err;
+ return true, err;
end);
end