Class: Google::Cloud::Bigtable::ValueRange
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::ValueRange
- Defined in:
- lib/google/cloud/bigtable/value_range.rb
Overview
ValueRange
Specifies a contiguous range of string values.
- from value bound : The value at which to begin the range. If neither field is set, interpreted as an empty string, inclusive.
- End value bound: The value at which to end the range. If neither field is set, interpreted as an infinite string value, exclusive.
Instance Method Summary collapse
-
#between(from_value, to_value) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the value range with inclusive lower and upper bounds.
-
#from(value, inclusive: true) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the row range with the lower bound.
-
#of(from_value, to_value) ⇒ Google::Cloud::Bigtable::ValueRange
Set value range with an inclusive lower bound and an exclusive upper bound.
-
#to(value, inclusive: false) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the value range with upper bound.
Instance Method Details
#between(from_value, to_value) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the value range with inclusive lower and upper bounds.
161 162 163 |
# File 'lib/google/cloud/bigtable/value_range.rb', line 161 def between from_value, to_value from(from_value).to(to_value, inclusive: true) end |
#from(value, inclusive: true) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the row range with the lower bound.
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/google/cloud/bigtable/value_range.rb', line 93 def from value, inclusive: true # If value is integer, covert it to a 64-bit signed big-endian integer. value = Convert.integer_to_signed_be_64 value if inclusive @grpc.start_value_closed = value else @grpc.start_value_open = value end self end |
#of(from_value, to_value) ⇒ Google::Cloud::Bigtable::ValueRange
Set value range with an inclusive lower bound and an exclusive upper bound.
185 186 187 |
# File 'lib/google/cloud/bigtable/value_range.rb', line 185 def of from_value, to_value from(from_value).to(to_value) end |
#to(value, inclusive: false) ⇒ Google::Cloud::Bigtable::ValueRange
Sets the value range with upper bound.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/google/cloud/bigtable/value_range.rb', line 130 def to value, inclusive: false # If value is integer, covert it to a 64-bit signed big-endian integer. value = Convert.integer_to_signed_be_64 value if inclusive @grpc.end_value_closed = value else @grpc.end_value_open = value end self end |