Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 9492:c03c60a2dede
mod_storage_sql: Have :users() throw an error on failure instead of returning non-iterator values
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 11 Oct 2018 19:15:46 +0100 |
parent | 9479:3a683b2476e2 |
child | 9493:55b40f3fa659 |
comparison
equal
deleted
inserted
replaced
9491:89e4cbd1a564 | 9492:c03c60a2dede |
---|---|
140 FROM "prosody" | 140 FROM "prosody" |
141 WHERE "host"=? AND "store"=?; | 141 WHERE "host"=? AND "store"=?; |
142 ]]; | 142 ]]; |
143 return engine:select(select_sql, host, self.store); | 143 return engine:select(select_sql, host, self.store); |
144 end); | 144 end); |
145 if not ok then return ok, result end | 145 if not ok then error(result); end |
146 return iterator(result); | 146 return iterator(result); |
147 end | 147 end |
148 | 148 |
149 --- Archive store API | 149 --- Archive store API |
150 | 150 |