projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6381f6f
)
tools/ejabberdsql2prosody: Handle INSERT statement form where column list is specifie...
author
Waqas Hussain
<waqas20@gmail.com>
Sat, 4 Feb 2012 19:10:13 +0000
(
00:10
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Sat, 4 Feb 2012 19:10:13 +0000
(
00:10
+0500)
tools/ejabberdsql2prosody.lua
patch
|
blob
|
history
diff --git
a/tools/ejabberdsql2prosody.lua
b/tools/ejabberdsql2prosody.lua
index 576f44366ab01d9aa84c307a03cc2de17df3bf86..c64faee0a502a02c508f28915eef76a5d6a6afd4 100644
(file)
--- a/
tools/ejabberdsql2prosody.lua
+++ b/
tools/ejabberdsql2prosody.lua
@@
-129,7
+129,12
@@
local function readInsert()
end
end
local tname = readTableName();
- for ch in ("` VALUES "):gmatch(".") do read(ch); end -- expect this
+ read("`"); read(" ") -- expect this
+ if peek() == "(" then -- skip column list
+ repeat until read() == ")";
+ read(" ");
+ end
+ for ch in ("VALUES "):gmatch(".") do read(ch); end -- expect this
local tuples = readTuples();
read(";"); read("\n");
return tname, tuples;