-
-
Save takeru/380676 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def each(opts={}) #todo(tx=nil) | |
| TinyDS::LowDS.retry_if_timeout do | |
| index = 0 | |
| @q.each(opts.dup) do |entity| # <= HERE | |
| if opts[:limit] && opts[:limit]<=index | |
| TinyDS::Base.logger.warn "too_many_results: each limit=#{opts[:limit]} index=#{index}" | |
| break | |
| end | |
| index += 1 | |
| yield(@model_class.new_from_entity(entity)) | |
| end | |
| end | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment