- D
- E
- F
- I
- N
- R
[RW] | eof |
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 580 def initialize(mysql, fields, field_count, data=nil) @handle = mysql @fields = fields @field_count = field_count @data = data @current_field = 0 @current_row = 0 @eof = false @row_count = 0 end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 592 def data_seek(n) @current_row = n end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 676 def each() while row = fetch_row do yield row end end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 682 def each_hash(with_table=nil) while hash = fetch_hash(with_table) do yield hash end end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 596 def fetch_field() return if @current_field >= @field_count f = @fields[@current_field] @current_field += 1 f end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 607 def fetch_field_direct(n) @fields[n] end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 603 def fetch_fields() @fields end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 636 def fetch_hash(with_table=nil) row = fetch_row return if row == nil hash = {} @fields.each_index do |i| f = with_table ? @fields[i].table+"."+@fields[i].name : @fields[i].name hash[f] = row[i] end hash end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 611 def fetch_lengths() @data ? @data[@current_row].map{|i| i ? i.length : 0} : @lengths end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 615 def fetch_row() if @data then if @current_row >= @data.length then @handle.status = :STATUS_READY return end ret = @data[@current_row] @current_row += 1 else return if @eof ret = @handle.read_one_row @field_count if ret == nil then @eof = true return end @lengths = ret.map{|i| i ? i.length : 0} @row_count += 1 end ret end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 647 def field_seek(n) @current_field = n end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 651 def field_tell() @current_field end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 655 def free() @handle.skip_result @handle = @fields = @data = nil end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 688 def inspect() "#<#{self.class}>" end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 660 def num_fields() @field_count end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 664 def num_rows() @data ? @data.length : @row_count end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 668 def row_seek(n) @current_row = n end
Source: show
# File rails/activerecord/lib/active_record/vendor/mysql.rb, line 672 def row_tell() @current_row end