Class: Innodb::HistoryList

Inherits:
Object
  • Object
show all
Defined in:
lib/innodb/history_list.rb

Overview

A single history list; this is a more intelligent wrapper around the basic Innodb::List::History which is provided elsewhere.

Defined Under Namespace

Classes: UndoRecordCursor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(list) ⇒ HistoryList

Initialize from a provided Innodb::List::History.



9
10
11
# File 'lib/innodb/history_list.rb', line 9

def initialize(list)
  @list = list
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



6
7
8
# File 'lib/innodb/history_list.rb', line 6

def list
  @list
end

Instance Method Details

#each_undo_recordObject



97
98
99
100
101
102
103
104
105
# File 'lib/innodb/history_list.rb', line 97

def each_undo_record
  unless block_given?
    return enum_for(:each_undo_record)
  end

  undo_record_cursor.each_undo_record do |rec|
    yield rec
  end
end

#undo_record_cursor(undo_record = :min, direction = :forward) ⇒ Object



93
94
95
# File 'lib/innodb/history_list.rb', line 93

def undo_record_cursor(undo_record=:min, direction=:forward)
  UndoRecordCursor.new(self, undo_record, direction)
end