Comparison

plugins/mod_storage_sql.lua @ 8051:b2681397bafa

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 03 Apr 2017 00:59:44 +0200
parent 8039:1f4bd8009961
parent 8050:c0f81dea4662
child 8074:4b403f881176
comparison
equal deleted inserted replaced
8049:0909de054b3f 8051:b2681397bafa
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