Class: Audrey::Query::Q0::Iterator
- Inherits:
-
Object
- Object
- Audrey::Query::Q0::Iterator
- Defined in:
- lib/audrey/query/q0.rb
Overview
Audrey::Query::Q0::Iterator
Instance Attribute Summary collapse
-
#eiterator ⇒ Object
readonly
Returns the value of attribute eiterator.
-
#pk ⇒ Object
readonly
Returns the value of attribute pk.
Instance Method Summary collapse
-
#close ⇒ Object
————————————————————————— close.
-
#initialize(q0, eiterator) ⇒ Iterator
constructor
————————————————————————— initialize.
-
#next ⇒ Object
————————————————————————— next.
Constructor Details
Instance Attribute Details
#eiterator ⇒ Object (readonly)
Returns the value of attribute eiterator.
322 323 324 |
# File 'lib/audrey/query/q0.rb', line 322 def eiterator @eiterator end |
#pk ⇒ Object (readonly)
Returns the value of attribute pk.
321 322 323 |
# File 'lib/audrey/query/q0.rb', line 321 def pk @pk end |
Instance Method Details
#close ⇒ Object
close
363 364 365 366 |
# File 'lib/audrey/query/q0.rb', line 363 def close @eiterator.close @q0.db.closers.delete(@pk) end |
#next ⇒ Object
next
342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/audrey/query/q0.rb', line 342 def next # $tm.hrm # if we get a next record if row = @eiterator.next return @db.object_from_pk(row['pk']) # else close else close() return nil end end |