Software /
code /
prosody
Comparison
plugins/mod_storage_sql2.lua @ 6729:daa5c83b2879
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 May 2015 22:56:39 +0200 |
parent | 6727:eb9c842b80fa |
parent | 6728:db28b8639737 |
child | 6745:6728ad041761 |
comparison
equal
deleted
inserted
replaced
6727:eb9c842b80fa | 6729:daa5c83b2879 |
---|---|
252 total = true; | 252 total = true; |
253 }; | 253 }; |
254 archive_store.__index = archive_store | 254 archive_store.__index = archive_store |
255 function archive_store:append(username, key, value, when, with) | 255 function archive_store:append(username, key, value, when, with) |
256 if type(when) ~= "number" then | 256 if type(when) ~= "number" then |
257 value, when, with = when, with, value; | 257 when, with, value = value, when, with; |
258 end | 258 end |
259 local user,store = username,self.store; | 259 local user,store = username,self.store; |
260 return engine:transaction(function() | 260 return engine:transaction(function() |
261 if key then | 261 if key then |
262 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); | 262 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); |