Software /
code /
prosody
Changeset
1611:e20f90743863
ejabberdsql2prosody: Allow for multiple INSERTs to the same table
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 28 Jul 2009 05:33:51 +0500 |
parents | 1610:07be0ac220d8 |
children | 1618:ba2a92230b77 |
files | tools/ejabberdsql2prosody.lua |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/ejabberdsql2prosody.lua Mon Jul 27 22:42:36 2009 +0100 +++ b/tools/ejabberdsql2prosody.lua Tue Jul 28 05:33:51 2009 +0500 @@ -136,7 +136,14 @@ while true do local tname, tuples = readInsert(); if tname then - t[tname] = tuples; + if t[name] then + local t_name = t[name]; + for i=1,#tuples do + table.insert(t_name, tuples[i]); + end + else + t[tname] = tuples; + end elseif peek() == nil then break; end