db:cols(sql)
Execute a SQL statement and return an iterator function that can be used in a for loop. The values will be returned using the Lua multiple return value feature.
Example
sum=0
db=sqlite.open('testdb')
for x in db:cols[[select x from foo]] do
sum=sum+x
end