Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 8050:c0f81dea4662
mod_storage_sql: Fix to use correct SQL query (thanks carlos)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 03 Apr 2017 00:34:37 +0200 |
| parent | 8038:cd6cef579e82 |
| child | 8051:b2681397bafa |
| child | 8073:7361412a9664 |
comparison
equal
deleted
inserted
replaced
| 8048:75e37366a03f | 8050:c0f81dea4662 |
|---|---|
| 93 if data and next(data) ~= nil then | 93 if data and next(data) ~= nil then |
| 94 local extradata = {}; | 94 local extradata = {}; |
| 95 for key, value in pairs(data) do | 95 for key, value in pairs(data) do |
| 96 if type(key) == "string" and key ~= "" then | 96 if type(key) == "string" and key ~= "" then |
| 97 local t, encoded_value = assert(serialize(value)); | 97 local t, encoded_value = assert(serialize(value)); |
| 98 engine:insert(delete_sql, host, user or "", store, key, t, encoded_value); | 98 engine:insert(insert_sql, host, user or "", store, key, t, encoded_value); |
| 99 else | 99 else |
| 100 extradata[key] = value; | 100 extradata[key] = value; |
| 101 end | 101 end |
| 102 end | 102 end |
| 103 if next(extradata) ~= nil then | 103 if next(extradata) ~= nil then |