google-cloud-bigtable 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/google/cloud/bigtable/convert.rb +12 -0
- data/lib/google/cloud/bigtable/mutation_entry.rb +6 -3
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +6 -1
- data/lib/google/cloud/bigtable/value_range.rb +24 -6
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceb71908240117b3c3e98f009a6be24f4ae9ca510523414b91720aab576f925a
|
4
|
+
data.tar.gz: 15c5a7c7617184eac62271c0ba4b2de71b4f9d643c25751dcef0de98dde7d67c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00155edefe171f720de9af636a6a8be2844f889c1750af57a851de83c567e6fc746ce1dbf2f05515d73f0424acade2566874d096f867af1b8c1f5b99e132e81c
|
7
|
+
data.tar.gz: e8a2f9731e9d43897c213ace6810f3a4dcc86a9f5d71eefcf802143c34ca6a151b23e2649081779932c03244e4f3c1ca182f214f122e82b76cbc3a0404d3e54f
|
data/CHANGELOG.md
CHANGED
@@ -77,6 +77,18 @@ module Google
|
|
77
77
|
|
78
78
|
Google::Protobuf::Timestamp.new seconds: time.to_i, nanos: time.nsec
|
79
79
|
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Converts an Integer to 64-bit signed big-endian integer data.
|
83
|
+
# Returns a string argument unchanged.
|
84
|
+
#
|
85
|
+
# @param value [String, Integer]
|
86
|
+
# @return [String]
|
87
|
+
#
|
88
|
+
def integer_to_signed_be_64 value
|
89
|
+
return [value].pack "q>" if value.is_a? Integer
|
90
|
+
value
|
91
|
+
end
|
80
92
|
end
|
81
93
|
end
|
82
94
|
end
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
|
18
|
+
require "google/cloud/bigtable/convert"
|
19
|
+
|
18
20
|
module Google
|
19
21
|
module Cloud
|
20
22
|
module Bigtable
|
@@ -84,8 +86,9 @@ module Google
|
|
84
86
|
# @param qualifier [String] Column qualifier name.
|
85
87
|
# The qualifier of the column into which new data should be written.
|
86
88
|
# Can be any byte string, including an empty string.
|
87
|
-
# @param value [String, Integer] Cell value data.
|
88
|
-
#
|
89
|
+
# @param value [String, Integer] Cell value data. The value to be written
|
90
|
+
# into the specified cell. If the argument is an Integer, it will be
|
91
|
+
# encoded as a 64-bit signed big-endian integer.
|
89
92
|
# @param timestamp [Integer] Timestamp value in microseconds.
|
90
93
|
# The timestamp of the cell into which new data should be written.
|
91
94
|
# Use -1 for current Bigtable server time.
|
@@ -112,7 +115,7 @@ module Google
|
|
112
115
|
#
|
113
116
|
def set_cell family, qualifier, value, timestamp: nil
|
114
117
|
# If value is integer, covert it to a 64-bit signed big-endian integer.
|
115
|
-
value =
|
118
|
+
value = Convert.integer_to_signed_be_64 value
|
116
119
|
options = {
|
117
120
|
family_name: family,
|
118
121
|
column_qualifier: qualifier,
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
|
18
|
+
require "google/cloud/bigtable/convert"
|
19
|
+
|
18
20
|
module Google
|
19
21
|
module Cloud
|
20
22
|
module Bigtable
|
@@ -147,10 +149,13 @@ module Google
|
|
147
149
|
# will not match the new line character `\n`, which may be present in a
|
148
150
|
# binary value.
|
149
151
|
#
|
150
|
-
# @param regex [String] Regex to match cell value
|
152
|
+
# @param regex [String, Integer] Regex to match cell value, or an Integer
|
153
|
+
# value to be encoded as a 64-bit signed big-endian integer.
|
151
154
|
# @return [Google::Cloud::Bigtable::RowFilter::SimpleFilter]
|
152
155
|
#
|
153
156
|
def value regex
|
157
|
+
# If regex is integer, covert it to a 64-bit signed big-endian integer.
|
158
|
+
regex = Convert.integer_to_signed_be_64 regex
|
154
159
|
@grpc.value_regex_filter = regex
|
155
160
|
self
|
156
161
|
end
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
|
18
|
+
require "google/cloud/bigtable/convert"
|
19
|
+
|
18
20
|
module Google
|
19
21
|
module Cloud
|
20
22
|
module Bigtable
|
@@ -65,7 +67,9 @@ module Google
|
|
65
67
|
##
|
66
68
|
# Sets the row range with the lower bound.
|
67
69
|
#
|
68
|
-
# @param value [String] The value. Required.
|
70
|
+
# @param value [String, Integer] The value. Required. If the argument
|
71
|
+
# is an Integer, it will be encoded as a 64-bit signed big-endian
|
72
|
+
# integer.
|
69
73
|
# @param inclusive [Boolean] Whether the value is an inclusive or
|
70
74
|
# exclusive lower bound. Default is `true`, an inclusive lower bound.
|
71
75
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
@@ -87,6 +91,8 @@ module Google
|
|
87
91
|
# range = table.new_value_range.from("value-001", inclusive: false)
|
88
92
|
#
|
89
93
|
def from value, inclusive: true
|
94
|
+
# If value is integer, covert it to a 64-bit signed big-endian integer.
|
95
|
+
value = Convert.integer_to_signed_be_64 value
|
90
96
|
if inclusive
|
91
97
|
@grpc.start_value_closed = value
|
92
98
|
else
|
@@ -98,7 +104,9 @@ module Google
|
|
98
104
|
##
|
99
105
|
# Sets the value range with upper bound.
|
100
106
|
#
|
101
|
-
# @param value [String] value. Required
|
107
|
+
# @param value [String, Integer] value. Required. If the argument
|
108
|
+
# is an Integer, it will be encoded as a 64-bit signed big-endian
|
109
|
+
# integer.
|
102
110
|
# @param inclusive [Boolean] Whether the value is an inclusive or
|
103
111
|
# exclusive lower bound. Default is `false`, an exclusive lower bound.
|
104
112
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
@@ -120,6 +128,8 @@ module Google
|
|
120
128
|
# range = table.new_value_range.to("value-010")
|
121
129
|
#
|
122
130
|
def to value, inclusive: false
|
131
|
+
# If value is integer, covert it to a 64-bit signed big-endian integer.
|
132
|
+
value = Convert.integer_to_signed_be_64 value
|
123
133
|
if inclusive
|
124
134
|
@grpc.end_value_closed = value
|
125
135
|
else
|
@@ -131,8 +141,12 @@ module Google
|
|
131
141
|
##
|
132
142
|
# Sets the value range with inclusive lower and upper bounds.
|
133
143
|
#
|
134
|
-
# @param from_value [String] Inclusive from value. Required
|
135
|
-
#
|
144
|
+
# @param from_value [String, Integer] Inclusive from value. Required.
|
145
|
+
# If the argument is an Integer, it will be encoded as a 64-bit
|
146
|
+
# signed big-endian integer.
|
147
|
+
# @param to_value [String, Integer] Inclusive to value. Required.
|
148
|
+
# If the argument is an Integer, it will be encoded as a 64-bit
|
149
|
+
# signed big-endian integer.
|
136
150
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
137
151
|
# Range with inclusive from and to values.
|
138
152
|
#
|
@@ -151,8 +165,12 @@ module Google
|
|
151
165
|
##
|
152
166
|
# Set value range with an inclusive lower bound and an exclusive upper bound.
|
153
167
|
#
|
154
|
-
# @param from_value [String] Inclusive from value
|
155
|
-
#
|
168
|
+
# @param from_value [String, Integer] Inclusive from value. Required.
|
169
|
+
# If the argument is an Integer, it will be encoded as a 64-bit
|
170
|
+
# signed big-endian integer.
|
171
|
+
# @param to_value [String, Integer] Exclusive to value. Required.
|
172
|
+
# If the argument is an Integer, it will be encoded as a 64-bit
|
173
|
+
# signed big-endian integer.
|
156
174
|
# @return [Google::Cloud::Bigtable::ValueRange]
|
157
175
|
# Range with an inclusive from value and an exclusive to value.
|
158
176
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-bigtable-admin-v2
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
- !ruby/object:Gem::Version
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
|
-
rubygems_version: 3.
|
251
|
+
rubygems_version: 3.2.6
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: API Client library for Cloud Bigtable API
|