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
660 661 662 663 664 |
# File 'lib/fdbimpl.rb', line 660 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.
658 659 660 |
# File 'lib/fdbimpl.rb', line 658 def key @key end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
658 659 660 |
# File 'lib/fdbimpl.rb', line 658 def offset @offset end |
#or_equal ⇒ Object (readonly)
Returns the value of attribute or_equal.
658 659 660 |
# File 'lib/fdbimpl.rb', line 658 def or_equal @or_equal end |
Class Method Details
.first_greater_or_equal(key) ⇒ Object
678 679 680 |
# File 'lib/fdbimpl.rb', line 678 def self.first_greater_or_equal(key) self.new(key, 0, 1) end |
.first_greater_than(key) ⇒ Object
674 675 676 |
# File 'lib/fdbimpl.rb', line 674 def self.first_greater_than(key) self.new(key, 1, 1) end |
.last_less_or_equal(key) ⇒ Object
670 671 672 |
# File 'lib/fdbimpl.rb', line 670 def self.last_less_or_equal(key) self.new(key, 1, 0) end |
.last_less_than(key) ⇒ Object
666 667 668 |
# File 'lib/fdbimpl.rb', line 666 def self.last_less_than(key) self.new(key, 0, 0) end |
Instance Method Details
#+(offset) ⇒ Object
682 683 684 |
# File 'lib/fdbimpl.rb', line 682 def +(offset) KeySelector.new(@key, @or_equal, @offset + offset) end |
#-(offset) ⇒ Object
686 687 688 |
# File 'lib/fdbimpl.rb', line 686 def -(offset) KeySelector.new(@key, @or_equal, @offset - offset) end |