I was looking at some documentation here:
http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki#db_exec
And found this code snippet:
sql=[=[
CREATE TABLE numbers(num1,num2,str);
INSERT INTO numbers VALUES(1,11,"ABC");
INSERT INTO numbers VALUES(2,22,"DEF");
INSERT INTO numbers VALUES(3,33,"UVW");
INSERT INTO numbers VALUES(4,44,"XYZ");
SELECT * FROM numbers;
]=]
function showrow(udata,cols,values,names)
assert(udata=='test_udata')
print('exec:')
for i=1,cols do print('',names[i],values[i]) end
return 0
end
db:exec(sql,showrow,'test_udata')
Here they use a multi-line string but add the nesting operator =
even though no nesting is taking place.
Why would might someone do this?