Class: Innodb::DataType::RollPointerType
- Inherits:
-
Object
- Object
- Innodb::DataType::RollPointerType
- Extended by:
- ReadBitsAtOffset
- Defined in:
- lib/innodb/data_type.rb
Overview
Rollback data pointer.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(base_type, modifiers, properties) ⇒ RollPointerType
constructor
A new instance of RollPointerType.
- #value(data) ⇒ Object
Methods included from ReadBitsAtOffset
Constructor Details
#initialize(base_type, modifiers, properties) ⇒ RollPointerType
Returns a new instance of RollPointerType.
344 345 346 347 |
# File 'lib/innodb/data_type.rb', line 344 def initialize(base_type, modifiers, properties) @width = 7 @name = Innodb::DataType.make_name(base_type, modifiers, properties) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
342 343 344 |
# File 'lib/innodb/data_type.rb', line 342 def name @name end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
342 343 344 |
# File 'lib/innodb/data_type.rb', line 342 def width @width end |
Class Method Details
.parse_roll_pointer(roll_ptr) ⇒ Object
349 350 351 352 353 354 355 356 357 358 |
# File 'lib/innodb/data_type.rb', line 349 def self.parse_roll_pointer(roll_ptr) { :is_insert => read_bits_at_offset(roll_ptr, 1, 55) == 1, :rseg_id => read_bits_at_offset(roll_ptr, 7, 48), :undo_log => { :page => read_bits_at_offset(roll_ptr, 32, 16), :offset => read_bits_at_offset(roll_ptr, 16, 0), } } end |
Instance Method Details
#value(data) ⇒ Object
360 361 362 363 |
# File 'lib/innodb/data_type.rb', line 360 def value(data) roll_ptr = BinData::Uint56be.read(data) self.class.parse_roll_pointer(roll_ptr) end |