I found that if I used #fetch then called #each on the results I would
be walking through the records using a cursor.

results = db.fetch(sql)
results.each{|r| doing_something }

If you add #all to the fetch it dumps all the records and works with
them in memory

results = db.fetch(sql).all
results.each{|r| doing_something }

I'm now working on a project that is using models and can't figure out
how to work with a collection of models using a cursor similar to the
above example. Any ideas?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to