Class: FDB::KeySelector
- Inherits:
-
Object
- Object
- FDB::KeySelector
- Defined in:
- lib/fdbimpl.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#or_equal ⇒ Object
readonly
Returns the value of attribute or_equal.
Class Method Summary collapse
- .first_greater_or_equal(key) ⇒ Object
- .first_greater_than(key) ⇒ Object
- .last_less_or_equal(key) ⇒ Object
- .last_less_than(key) ⇒ Object
Instance Method Summary collapse
- #+(offset) ⇒ Object
- #-(offset) ⇒ Object
-
#initialize(key, or_equal, offset) ⇒ KeySelector
constructor
A new instance of KeySelector.
Constructor Details
#initialize(key, or_equal, offset) ⇒ KeySelector
Returns a new instance of KeySelector.
636 637 638 639 640 |
# File 'lib/fdbimpl.rb', line 636 def initialize(key, or_equal, offset) @key = key @or_equal = or_equal @offset = offset end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
634 635 636 |
# File 'lib/fdbimpl.rb', line 634 def key @key end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
634 635 636 |
# File 'lib/fdbimpl.rb', line 634 def offset @offset end |
#or_equal ⇒ Object (readonly)
Returns the value of attribute or_equal.
634 635 636 |
# File 'lib/fdbimpl.rb', line 634 def or_equal @or_equal end |
Class Method Details
.first_greater_or_equal(key) ⇒ Object
654 655 656 |
# File 'lib/fdbimpl.rb', line 654 def self.first_greater_or_equal(key) self.new(key, 0, 1) end |
.first_greater_than(key) ⇒ Object
650 651 652 |
# File 'lib/fdbimpl.rb', line 650 def self.first_greater_than(key) self.new(key, 1, 1) end |
.last_less_or_equal(key) ⇒ Object
646 647 648 |
# File 'lib/fdbimpl.rb', line 646 def self.last_less_or_equal(key) self.new(key, 1, 0) end |
.last_less_than(key) ⇒ Object
642 643 644 |
# File 'lib/fdbimpl.rb', line 642 def self.last_less_than(key) self.new(key, 0, 0) end |
Instance Method Details
#+(offset) ⇒ Object
658 659 660 |
# File 'lib/fdbimpl.rb', line 658 def +(offset) KeySelector.new(@key, @or_equal, @offset + offset) end |
#-(offset) ⇒ Object
662 663 664 |
# File 'lib/fdbimpl.rb', line 662 def -(offset) KeySelector.new(@key, @or_equal, @offset - offset) end |