aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-26 14:32:42 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-26 14:32:42 +0000
commit340d2e50d3fed6514a26566612534c384a008f4c (patch)
treebb548f831e5fa7c7b37274ac0c5f79e8791aaa46 /lualib
parenta1b9dffcf77bbb129d267a422e68721f9e034f11 (diff)
downloadrspamd-340d2e50d3fed6514a26566612534c384a008f4c.tar.gz
rspamd-340d2e50d3fed6514a26566612534c384a008f4c.zip
[Minor] Clickhouse: Fix text returns
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_clickhouse.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua
index e532cd643..4e20229b0 100644
--- a/lualib/lua_clickhouse.lua
+++ b/lualib/lua_clickhouse.lua
@@ -74,10 +74,13 @@ end
local function row_to_tsv(row)
for i,elt in ipairs(row) do
- if type(elt) == 'table' then
+ local t = type(elt)
+ if t == 'table' then
row[i] = '[' .. array_to_string(elt) .. ']'
- elseif type(elt) == 'number' then
+ elseif t == 'number' then
row[i] = ch_number(elt)
+ elseif t == 'userdata' then
+ row[i] = clickhouse_quote(tostring(elt))
else
row[i] = clickhouse_quote(elt)
end