lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

I'm thinking of using iterator to iterate over the results of a SQL query, something like:

for row in result("SELECT id,name FROM USER") do
  if row.id == 3 then break end
end

but I need to "clean-up" the iterator when it finishes (i.e. after the loop) or whenever I have a "break" or a "return" statement.

As far as I understand there's no way to do this, right?

Thanks in advance,
Antonio