Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 12574:18d33668c5fa
mod_storage_sql: Remove Lua 5.1 compatibility hack
Part of #1600
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Jul 2022 17:30:06 +0200 |
parent | 11971:0b350909da24 |
child | 12589:39ae08180c81 |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Sat Jul 02 17:31:14 2022 +0200 +++ b/plugins/mod_storage_sql.lua Sat Jul 02 17:30:06 2022 +0200 @@ -382,8 +382,7 @@ -- Set of ids if query.ids then local nids, nargs = #query.ids, #args; - -- COMPAT Lua 5.1: No separator argument to string.rep - where[#where + 1] = "\"key\" IN (" .. string.rep("?,", nids):sub(1,-2) .. ")"; + where[#where + 1] = "\"key\" IN (" .. string.rep("?", nids, ",") .. ")"; for i, id in ipairs(query.ids) do args[nargs+i] = id; end