Mercurial > prosody-hg
comparison 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 |
| parents | 0b350909da24 |
| children | 39ae08180c81 |
comparison
equal
deleted
inserted
replaced
| 12573:0f4feaf9ca64 | 12574:18d33668c5fa |
|---|---|
| 380 end | 380 end |
| 381 | 381 |
| 382 -- Set of ids | 382 -- Set of ids |
| 383 if query.ids then | 383 if query.ids then |
| 384 local nids, nargs = #query.ids, #args; | 384 local nids, nargs = #query.ids, #args; |
| 385 -- COMPAT Lua 5.1: No separator argument to string.rep | 385 where[#where + 1] = "\"key\" IN (" .. string.rep("?", nids, ",") .. ")"; |
| 386 where[#where + 1] = "\"key\" IN (" .. string.rep("?,", nids):sub(1,-2) .. ")"; | |
| 387 for i, id in ipairs(query.ids) do | 386 for i, id in ipairs(query.ids) do |
| 388 args[nargs+i] = id; | 387 args[nargs+i] = id; |
| 389 end | 388 end |
| 390 end | 389 end |
| 391 end | 390 end |
