iterate over each record
544317
def _iterate_records(self):
        
        raise_invalid_gzip = False
        empty_record = False

        while True:
            try:
                self.record = self._next_record(self.next_line)
                if raise_invalid_gzip:
                    self._raise_invalid_gzip_err()

                yield self.record

            except EOFError:
                empty_record = True

            self.read_to_end()

            if self.reader.decompressor:
                # if another gzip member, continue
                if self.reader.read_next_member():
                    continue

                # if empty record, then we're done
                elif empty_record:
                    break

                # otherwise, probably a gzip
                # containing multiple non-chunked records
                # raise this as an error
                else:
                    raise_invalid_gzip = True

            # non-gzip, so we're done
            elif empty_record:
                break

        self.close()
1175147
def records(self):
		''''''
		if self._records == None:
			self._records = self._get_records()
		return self._records
957901
def getAllRecordIDs( dbid )
      rids = []
      if dbid
         getSchema( dbid )
         next_record_id = getResponseElement( "table/original/next_record_id" )
         if next_record_id and next_record_id.has_text?
            next_record_id = next_record_id.text
            (1..next_record_id.to_i).each{ |rid|
               begin
                  _getRecordInfo( rid )
                  rids << rid.to_s if update_id
               rescue
               end
            }
         end
      end
      if block_given?
        rids.each { |id| yield id }
      else
        rids
      end
   end
1272465
def iterateFilteredRecords( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      fields = []
      regexp = {}
      fieldNames.each{|field|
         if field.is_a?(Hash)
            fields << field.keys[0]
            regexp[field.keys[0]] = field.values[0]
         elsif field.is_a?(String)
            fields << field
         end
      }
      regexp = nil if regexp.length == 0
      iterateRecords(dbid,fields,query,qid,qname,clist,slist,fmt,options){|record|
         if regexp
            match = true
            fields.each{|field|
               if regexp[field] 
                  unless record[field] and record[field].match(regexp[field])
                     match = false 
                     break
                  end
               end
            }
            yield record if match
         else
            yield record
         end
      }
   end
1010999
def tail(records, tail):
    
    logging.info('Applying _tail generator: '
                 'limiting results to top ' + tail + ' records.')

    if tail == '+0':
        for record in records:
            yield record
    elif '+' in tail:
        tail = int(tail) - 1
        for record in itertools.islice(records, tail, None):
            yield record
    else:
        with _record_buffer(records) as r:
            record_count = sum(1 for record in r())
            start_index = max(record_count - int(tail), 0)
            for record in itertools.islice(r(), start_index, None):
                yield record
628380
def each
      @raw_page['records'].each { |record| yield Restforce::Mash.build(record, @client) }

      np = next_page
      while np
        np.current_page.each { |record| yield record }
        np = np.next_page
      end
    end
1197254
def iterateRecordInfos(dbid, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil)
      getSchema(dbid)
      recordIDFieldName = lookupFieldNameFromID("3")
      fieldNames = getFieldNames
      fieldIDs = {}
      fieldNames.each{|name|fieldIDs[name] = lookupFieldIDByName(name)}
      iterateRecords(dbid, [recordIDFieldName], query, qid, qname, clist, slist, fmt, options){|r|
        getRecordInfo(dbid,r[recordIDFieldName])
        fieldValues = {}
        fieldIDs.each{|k,v| 
          fieldValues[k] = getFieldDataPrintableValue(v)
          fieldValues[k] ||= getFieldDataValue(v)
        }        
        yield fieldValues
      }
  end
276854
def get_records(self):
        
        self.close()
        with open(self.path, 'r') as filep:
            first_line = filep.readline().split(',')
            if first_line[0] != self.fields[0]:
                yield first_line

            for line in filep:
                yield line.split(',')
1200300
def filter_records(self, records):
        
        for record in records:
            try:
                filtered = self.filter_record(record)
                assert (filtered)
                # Quick tracking whether the sequence was modified
                if filtered.seq == record.seq:
                    self.passed_unchanged += 1
                else:
                    self.passed_changed += 1
                yield filtered
            except FailedFilter as e:
                self.failed += 1
                v = e.value
                if self.listener:
                    self.listener(
                        'failed_filter',
                        record,
                        filter_name=self.name,
                        value=v)
392009
function each(obj, iter) {
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) iter(key, obj[key]);
  }
}
740570
def records( self ):
        
        records = []
        for i in range(self.count()):
            record = self.recordAt(i)
            if record:
                records.append(record)
        return records
339575
def create_many(self, records):
        
        instances = []

        for record in records:
            instances.append(self.create(**record))

        return instances
746625
def find_loops( record, index, stop_types = STOP_TYPES, open=None, seen = None ):
    """"""
    if open is None:
        open = []
    if seen is None:
        seen = set()
    for child in children( record, index, stop_types = stop_types ):
        if child['type'] in stop_types or child['type'] == LOOP_TYPE:
            continue
        if child['address'] in open:
            # loop has been found 
            start = open.index( child['address'] )
            new = frozenset( open[start:] )
            if new not in seen:
                seen.add(new)
                yield new
        elif child['address'] in seen:
            continue 
        else:
            seen.add( child['address'])
            open.append( child['address'] )
            for loop in find_loops( child, index, stop_types=stop_types, open=open, seen=seen ):
                yield loop 
            open.pop( -1 )
767146
def iterable_hook(self, name, iterable):
        
        for record in iterable:
            self(name, record)
            yield record
1282572
def each
      unless block_given?
        return self.enum_for(:each)
      else
        while @parser.has_next?
          event = @parser.pull
          # if it's the start of a record element 
          if event.start_element? and strip_ns(event[0]) == 'record'
            yield build_record
          end
        end    
      end
    end
15877
function each(collection, iterator) {
  for (var i = 0; i < collection.length; i++) {
    iterator(collection[i], i);
  }
}
1211009
def _iterator(self, response):
        '''
        
        '''

        while True:
            result = self._parse_data(response)
            bookmark = response.get('bookmark')
            if result:
                for row in result:
                    yield row

                del result

                if not bookmark:
                    break

                response = self._call(bookmark=bookmark)

            else:
                break