Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 7175:3e7c69190193
mod_storage_sql: Remove debug logging of archive queries
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 21 Feb 2016 19:29:00 +0100 |
parent | 7173:d8c060615aa1 |
child | 7178:5953f415c815 |
comparison
equal
deleted
inserted
replaced
7174:d350e475f94e | 7175:3e7c69190193 |
---|---|
273 if query.limit then | 273 if query.limit then |
274 args[#args+1] = query.limit; | 274 args[#args+1] = query.limit; |
275 end | 275 end |
276 | 276 |
277 sql_query = sql_query:format(t_concat(where, " AND "), query.reverse and "DESC" or "ASC", query.limit and " LIMIT ?" or ""); | 277 sql_query = sql_query:format(t_concat(where, " AND "), query.reverse and "DESC" or "ASC", query.limit and " LIMIT ?" or ""); |
278 module:log("debug", sql_query); | |
279 return engine:select(sql_query, unpack(args)); | 278 return engine:select(sql_query, unpack(args)); |
280 end); | 279 end); |
281 if not ok then return ok, result end | 280 if not ok then return ok, result end |
282 return function() | 281 return function() |
283 local row = result(); | 282 local row = result(); |
299 table.remove(where, 2); | 298 table.remove(where, 2); |
300 end | 299 end |
301 archive_where(query, args, where); | 300 archive_where(query, args, where); |
302 archive_where_id_range(query, args, where); | 301 archive_where_id_range(query, args, where); |
303 sql_query = sql_query:format(t_concat(where, " AND ")); | 302 sql_query = sql_query:format(t_concat(where, " AND ")); |
304 module:log("debug", sql_query); | |
305 return engine:delete(sql_query, unpack(args)); | 303 return engine:delete(sql_query, unpack(args)); |
306 end); | 304 end); |
307 end | 305 end |
308 | 306 |
309 local stores = { | 307 local stores = { |