Method: Cequel::Record::RecordSet#find_each_row

Defined in:
lib/cequel/record/record_set.rb

#find_each_row(options = {}) {|row| ... } ⇒ Enumerator, void

Enumerate over the row data for each record in this record set, without hydrating an actual Cequel::Record instance. Useful for operations where speed is at a premium.

Parameters:

  • options (Options) (defaults to: {})

    options for querying the database

Options Hash (options):

  • :batch_size (Integer) — default: 1000

    the maximum number of rows to return per batch query

Yield Parameters:

  • row (Hash<Symbol,Object>)

    a hash of column names to values for each row

Returns:

  • (Enumerator)

    if no block given

  • (void)

See Also:

Since:

  • 1.0.0



628
629
630
631
# File 'lib/cequel/record/record_set.rb', line 628

def find_each_row(options = {}, &block)
  return enum_for(:find_each_row, options) unless block
  find_rows_in_batches(options) { |rows| rows.each(&block) }
end