Comparison

tools/ejabberdsql2prosody.lua @ 4496:11983a1e92c0

tools/ejabberdsql2prosody: Handle INSERT statement form where column list is specified (by skipping the column list).
author Waqas Hussain <waqas20@gmail.com>
date Sun, 05 Feb 2012 00:10:13 +0500
parent 4384:7fbcb7e6a6a0
child 5215:b3d837c1ccf1
comparison
equal deleted inserted replaced
4495:c0f5c78cb817 4496:11983a1e92c0
127 while peek() and read() ~= "\n" do end 127 while peek() and read() ~= "\n" do end
128 return nil; 128 return nil;
129 end 129 end
130 end 130 end
131 local tname = readTableName(); 131 local tname = readTableName();
132 for ch in ("` VALUES "):gmatch(".") do read(ch); end -- expect this 132 read("`"); read(" ") -- expect this
133 if peek() == "(" then -- skip column list
134 repeat until read() == ")";
135 read(" ");
136 end
137 for ch in ("VALUES "):gmatch(".") do read(ch); end -- expect this
133 local tuples = readTuples(); 138 local tuples = readTuples();
134 read(";"); read("\n"); 139 read(";"); read("\n");
135 return tname, tuples; 140 return tname, tuples;
136 end 141 end
137 142