swcdb 0.5.8.0 → 0.5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swcdb/thrift/gen/service.rb +66 -1
- data/lib/swcdb/thrift/gen/service_constants.rb +15 -1
- data/lib/swcdb/thrift/gen/service_types.rb +291 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25616d077a484765ee804a22f367ebde951f1c2ab5548a9bae4a7618ea860092
|
4
|
+
data.tar.gz: e920057fc1dc9a712d506c5c42f03f1f36f65074436d48cde3b61e6a2c8a9f68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 809705f9a5d47f4f398ff264bda1d157698e86459e09fe63311fac24fee608a70cd74b899f0cf3e33af26fab827cbcc7e1d0fd614121af31073f491870947954
|
7
|
+
data.tar.gz: ef93b99268f6fa697014de9e1bc6bc1c639babda3aad9824efe13a00b56c4e37071da9e2e1945d34bbba7570d6c66268782d3c6710ee21e5b68c7ba7235608d4
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.17.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -233,6 +233,21 @@ module Swcdb
|
|
233
233
|
return
|
234
234
|
end
|
235
235
|
|
236
|
+
def update_by_types(plain, serial, updater_id)
|
237
|
+
send_update_by_types(plain, serial, updater_id)
|
238
|
+
recv_update_by_types()
|
239
|
+
end
|
240
|
+
|
241
|
+
def send_update_by_types(plain, serial, updater_id)
|
242
|
+
send_message('update_by_types', Update_by_types_args, :plain => plain, :serial => serial, :updater_id => updater_id)
|
243
|
+
end
|
244
|
+
|
245
|
+
def recv_update_by_types()
|
246
|
+
result = receive_message(Update_by_types_result)
|
247
|
+
raise result.e unless result.e.nil?
|
248
|
+
return
|
249
|
+
end
|
250
|
+
|
236
251
|
def mng_column(func, schema)
|
237
252
|
send_mng_column(func, schema)
|
238
253
|
recv_mng_column()
|
@@ -519,6 +534,17 @@ module Swcdb
|
|
519
534
|
write_result(result, oprot, 'update_serial', seqid)
|
520
535
|
end
|
521
536
|
|
537
|
+
def process_update_by_types(seqid, iprot, oprot)
|
538
|
+
args = read_args(iprot, Update_by_types_args)
|
539
|
+
result = Update_by_types_result.new()
|
540
|
+
begin
|
541
|
+
@handler.update_by_types(args.plain, args.serial, args.updater_id)
|
542
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
543
|
+
result.e = e
|
544
|
+
end
|
545
|
+
write_result(result, oprot, 'update_by_types', seqid)
|
546
|
+
end
|
547
|
+
|
522
548
|
def process_mng_column(seqid, iprot, oprot)
|
523
549
|
args = read_args(iprot, Mng_column_args)
|
524
550
|
result = Mng_column_result.new()
|
@@ -1106,6 +1132,45 @@ module Swcdb
|
|
1106
1132
|
::Thrift::Struct.generate_accessors self
|
1107
1133
|
end
|
1108
1134
|
|
1135
|
+
class Update_by_types_args
|
1136
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1137
|
+
PLAIN = 1
|
1138
|
+
SERIAL = 2
|
1139
|
+
UPDATER_ID = 3
|
1140
|
+
|
1141
|
+
FIELDS = {
|
1142
|
+
# The PLAIN Cells to update
|
1143
|
+
PLAIN => {:type => ::Thrift::Types::MAP, :name => 'plain', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::UCell}}},
|
1144
|
+
# The SERIAL Cells to update
|
1145
|
+
SERIAL => {:type => ::Thrift::Types::MAP, :name => 'serial', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::UCellSerial}}},
|
1146
|
+
# The Updater ID to use for write
|
1147
|
+
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
def struct_fields; FIELDS; end
|
1151
|
+
|
1152
|
+
def validate
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
::Thrift::Struct.generate_accessors self
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
class Update_by_types_result
|
1159
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1160
|
+
E = 1
|
1161
|
+
|
1162
|
+
FIELDS = {
|
1163
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1164
|
+
}
|
1165
|
+
|
1166
|
+
def struct_fields; FIELDS; end
|
1167
|
+
|
1168
|
+
def validate
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
::Thrift::Struct.generate_accessors self
|
1172
|
+
end
|
1173
|
+
|
1109
1174
|
class Mng_column_args
|
1110
1175
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1111
1176
|
FUNC = 1
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.17.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -10,6 +10,20 @@ require 'swcdb/thrift/gen/service_types'
|
|
10
10
|
module Swcdb
|
11
11
|
module Thrift
|
12
12
|
module Gen
|
13
|
+
TIMESTAMP_NULL = -9223372036854775807
|
14
|
+
|
15
|
+
TIMESTAMP_AUTO = -9223372036854775806
|
16
|
+
|
17
|
+
FU_CTRL_DEFAULT = 0
|
18
|
+
|
19
|
+
FU_CTRL_NO_ADD_FIELD = 1
|
20
|
+
|
21
|
+
FU_CTRL_DELETE_FIELD = 2
|
22
|
+
|
23
|
+
FU_CTRL_VALUE_SET = 4
|
24
|
+
|
25
|
+
FU_CTRL_VALUE_DEL = 8
|
26
|
+
|
13
27
|
end
|
14
28
|
end
|
15
29
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.17.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -112,8 +112,12 @@ module Swcdb
|
|
112
112
|
FOSBS = 17
|
113
113
|
# [ <- ] : -fosupset [fosps] (eq/full ordered superset)
|
114
114
|
FOSPS = 18
|
115
|
-
|
116
|
-
|
115
|
+
# [ :< ] : -fip (fraction include prior)
|
116
|
+
FIP = 19
|
117
|
+
# [ : ] : -fi (fraction include)
|
118
|
+
FI = 20
|
119
|
+
VALUE_MAP = {0 => "NONE", 1 => "PF", 2 => "GT", 3 => "GE", 4 => "EQ", 5 => "LE", 6 => "LT", 7 => "NE", 8 => "RE", 9 => "VGT", 10 => "VGE", 11 => "VLE", 12 => "VLT", 13 => "SBS", 14 => "SPS", 15 => "POSBS", 16 => "POSPS", 17 => "FOSBS", 18 => "FOSPS", 19 => "FIP", 20 => "FI"}
|
120
|
+
VALID_VALUES = Set.new([NONE, PF, GT, GE, EQ, LE, LT, NE, RE, VGT, VGE, VLE, VLT, SBS, SPS, POSBS, POSPS, FOSBS, FOSPS, FIP, FI]).freeze
|
117
121
|
end
|
118
122
|
|
119
123
|
module SpecFlagsOpt
|
@@ -140,6 +144,23 @@ module Swcdb
|
|
140
144
|
VALID_VALUES = Set.new([UPDATING, DELETING]).freeze
|
141
145
|
end
|
142
146
|
|
147
|
+
module UpdateOP
|
148
|
+
# The OP supported by column-types: PLAIN, SERIAL, COUNTER. Replaces with the update value (_default as well if other OP not supported by the col-type_)
|
149
|
+
REPLACE = 0
|
150
|
+
# The OP supported by column-types: PLAIN, SERIAL. Appends the update value to the cell's current
|
151
|
+
APPEND = 1
|
152
|
+
# The OP supported by column-types: PLAIN, SERIAL. Prepends the update value to the cell's current
|
153
|
+
PREPEND = 2
|
154
|
+
# The OP supported by column-type PLAIN. Inserts the update value at position in current value (appends if pos above value)
|
155
|
+
INSERT = 3
|
156
|
+
# The OP supported by column-type PLAIN. Overwrites the current value at position with new value (appends if pos above value)
|
157
|
+
OVERWRITE = 4
|
158
|
+
# The OP supported by column-type SERIAL. update is done by the inner serial-fields defintions
|
159
|
+
SERIAL = 5
|
160
|
+
VALUE_MAP = {0 => "REPLACE", 1 => "APPEND", 2 => "PREPEND", 3 => "INSERT", 4 => "OVERWRITE", 5 => "SERIAL"}
|
161
|
+
VALID_VALUES = Set.new([REPLACE, APPEND, PREPEND, INSERT, OVERWRITE, SERIAL]).freeze
|
162
|
+
end
|
163
|
+
|
143
164
|
module Flag
|
144
165
|
# Unknown/Undefined
|
145
166
|
NONE = 0
|
@@ -153,6 +174,42 @@ module Swcdb
|
|
153
174
|
VALID_VALUES = Set.new([NONE, INSERT, DELETE_LE, DELETE_EQ]).freeze
|
154
175
|
end
|
155
176
|
|
177
|
+
module FU_MATH_OP
|
178
|
+
# set field value to the new value
|
179
|
+
EQUAL = 0
|
180
|
+
# plus new value to field's value (negative number allowed)
|
181
|
+
PLUS = 1
|
182
|
+
# multiply current value by update value
|
183
|
+
MULTIPLY = 2
|
184
|
+
# divide current value by the new value (ignored at zero)
|
185
|
+
DIVIDE = 3
|
186
|
+
VALUE_MAP = {0 => "EQUAL", 1 => "PLUS", 2 => "MULTIPLY", 3 => "DIVIDE"}
|
187
|
+
VALID_VALUES = Set.new([EQUAL, PLUS, MULTIPLY, DIVIDE]).freeze
|
188
|
+
end
|
189
|
+
|
190
|
+
module FU_LIST_OP
|
191
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Replaces with the update value
|
192
|
+
REPLACE = 0
|
193
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Appends the update value to a field value
|
194
|
+
APPEND = 1
|
195
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Prepends the update value to a field value
|
196
|
+
PREPEND = 2
|
197
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Insert the update value at position in a field value (appends if pos above value)
|
198
|
+
INSERT = 3
|
199
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Overwrites a field value at position with new value (appends if pos above value)
|
200
|
+
OVERWRITE = 4
|
201
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Erases the position in a field value
|
202
|
+
ERASE = 5
|
203
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP
|
204
|
+
BY_UNIQUE = 6
|
205
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP and Comparator
|
206
|
+
BY_COND = 7
|
207
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value is with Postion and OP in items
|
208
|
+
BY_INDEX = 8
|
209
|
+
VALUE_MAP = {0 => "REPLACE", 1 => "APPEND", 2 => "PREPEND", 3 => "INSERT", 4 => "OVERWRITE", 5 => "ERASE", 6 => "BY_UNIQUE", 7 => "BY_COND", 8 => "BY_INDEX"}
|
210
|
+
VALID_VALUES = Set.new([REPLACE, APPEND, PREPEND, INSERT, OVERWRITE, ERASE, BY_UNIQUE, BY_COND, BY_INDEX]).freeze
|
211
|
+
end
|
212
|
+
|
156
213
|
module CellsResult
|
157
214
|
# Correspond to result on Cells (Cells in list)
|
158
215
|
IN_LIST = 0
|
@@ -188,6 +245,8 @@ module Swcdb
|
|
188
245
|
|
189
246
|
class SpecValue; end
|
190
247
|
|
248
|
+
class SpecUpdateOP; end
|
249
|
+
|
191
250
|
class SpecIntervalUpdate; end
|
192
251
|
|
193
252
|
class SpecIntervalUpdateSerial; end
|
@@ -222,6 +281,18 @@ module Swcdb
|
|
222
281
|
|
223
282
|
class CellValueSerial; end
|
224
283
|
|
284
|
+
class FU_INT64; end
|
285
|
+
|
286
|
+
class FU_DOUBLE; end
|
287
|
+
|
288
|
+
class FU_BYTES; end
|
289
|
+
|
290
|
+
class FU_LI; end
|
291
|
+
|
292
|
+
class FU_LB; end
|
293
|
+
|
294
|
+
class CellValueSerialOp; end
|
295
|
+
|
225
296
|
class UCellSerial; end
|
226
297
|
|
227
298
|
class Cell; end
|
@@ -570,12 +641,36 @@ module Swcdb
|
|
570
641
|
::Thrift::Struct.generate_accessors self
|
571
642
|
end
|
572
643
|
|
644
|
+
class SpecUpdateOP
|
645
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
646
|
+
OP = 1
|
647
|
+
POS = 2
|
648
|
+
|
649
|
+
FIELDS = {
|
650
|
+
# The Operation of update
|
651
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :enum_class => ::Swcdb::Thrift::Gen::UpdateOP},
|
652
|
+
# The position/index of INSERT and OVERWRITE update operations
|
653
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true}
|
654
|
+
}
|
655
|
+
|
656
|
+
def struct_fields; FIELDS; end
|
657
|
+
|
658
|
+
def validate
|
659
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::UpdateOP::VALID_VALUES.include?(@op)
|
660
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
::Thrift::Struct.generate_accessors self
|
665
|
+
end
|
666
|
+
|
573
667
|
# The Value specs for an Updating Interval of 'updating' in SpecInterval
|
574
668
|
class SpecIntervalUpdate
|
575
669
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
576
670
|
V = 1
|
577
671
|
TS = 2
|
578
672
|
ENCODER = 3
|
673
|
+
UPDATE_OP = 4
|
579
674
|
|
580
675
|
FIELDS = {
|
581
676
|
# The value for the updated cell
|
@@ -583,7 +678,9 @@ module Swcdb
|
|
583
678
|
# The timestamp for the updated cell NULL: MIN_INT64+1, AUTO:MIN_INT64+2 (or not-set)
|
584
679
|
TS => {:type => ::Thrift::Types::I64, :name => 'ts', :optional => true},
|
585
680
|
# Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD
|
586
|
-
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType}
|
681
|
+
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType},
|
682
|
+
# Optionally the operaton of value update
|
683
|
+
UPDATE_OP => {:type => ::Thrift::Types::STRUCT, :name => 'update_op', :class => ::Swcdb::Thrift::Gen::SpecUpdateOP, :optional => true}
|
587
684
|
}
|
588
685
|
|
589
686
|
def struct_fields; FIELDS; end
|
@@ -602,15 +699,21 @@ module Swcdb
|
|
602
699
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
603
700
|
TS = 1
|
604
701
|
V = 2
|
605
|
-
|
702
|
+
V_OP = 3
|
703
|
+
ENCODER = 4
|
704
|
+
UPDATE_OP = 5
|
606
705
|
|
607
706
|
FIELDS = {
|
608
707
|
# The timestamp for the updated cell NULL: MIN_INT64-1, AUTO:MIN_INT64-1
|
609
708
|
TS => {:type => ::Thrift::Types::I64, :name => 'ts'},
|
610
|
-
# The
|
709
|
+
# The values of serial-fields for the updated cell
|
611
710
|
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellValueSerial}},
|
711
|
+
# The values of serial-fields for the the SERIAL operation update
|
712
|
+
V_OP => {:type => ::Thrift::Types::LIST, :name => 'v_op', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellValueSerialOp}},
|
612
713
|
# Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD
|
613
|
-
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType}
|
714
|
+
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType},
|
715
|
+
# Optionally the operaton of value update
|
716
|
+
UPDATE_OP => {:type => ::Thrift::Types::STRUCT, :name => 'update_op', :class => ::Swcdb::Thrift::Gen::SpecUpdateOP, :optional => true}
|
614
717
|
}
|
615
718
|
|
616
719
|
def struct_fields; FIELDS; end
|
@@ -1070,6 +1173,187 @@ module Swcdb
|
|
1070
1173
|
::Thrift::Struct.generate_accessors self
|
1071
1174
|
end
|
1072
1175
|
|
1176
|
+
# Serial INT64 Field Update
|
1177
|
+
class FU_INT64
|
1178
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1179
|
+
CTRL = 1
|
1180
|
+
OP = 2
|
1181
|
+
POS = 3
|
1182
|
+
COMP = 4
|
1183
|
+
V = 5
|
1184
|
+
|
1185
|
+
FIELDS = {
|
1186
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1187
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_MATH_OP},
|
1188
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1189
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1190
|
+
V => {:type => ::Thrift::Types::I64, :name => 'v'}
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
def struct_fields; FIELDS; end
|
1194
|
+
|
1195
|
+
def validate
|
1196
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_MATH_OP::VALID_VALUES.include?(@op)
|
1197
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1198
|
+
end
|
1199
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1200
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1201
|
+
end
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
::Thrift::Struct.generate_accessors self
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
# Serial DOUBLE Field Update
|
1208
|
+
class FU_DOUBLE
|
1209
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1210
|
+
CTRL = 1
|
1211
|
+
OP = 2
|
1212
|
+
POS = 3
|
1213
|
+
COMP = 4
|
1214
|
+
V = 5
|
1215
|
+
|
1216
|
+
FIELDS = {
|
1217
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1218
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_MATH_OP},
|
1219
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1220
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1221
|
+
V => {:type => ::Thrift::Types::DOUBLE, :name => 'v'}
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
def struct_fields; FIELDS; end
|
1225
|
+
|
1226
|
+
def validate
|
1227
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_MATH_OP::VALID_VALUES.include?(@op)
|
1228
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1229
|
+
end
|
1230
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1231
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1232
|
+
end
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
::Thrift::Struct.generate_accessors self
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
# Serial BYTES Field Update
|
1239
|
+
class FU_BYTES
|
1240
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1241
|
+
CTRL = 1
|
1242
|
+
OP = 2
|
1243
|
+
POS = 3
|
1244
|
+
COMP = 4
|
1245
|
+
V = 5
|
1246
|
+
|
1247
|
+
FIELDS = {
|
1248
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1249
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1250
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1251
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1252
|
+
V => {:type => ::Thrift::Types::STRING, :name => 'v', :binary => true}
|
1253
|
+
}
|
1254
|
+
|
1255
|
+
def struct_fields; FIELDS; end
|
1256
|
+
|
1257
|
+
def validate
|
1258
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1259
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1260
|
+
end
|
1261
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1262
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1263
|
+
end
|
1264
|
+
end
|
1265
|
+
|
1266
|
+
::Thrift::Struct.generate_accessors self
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
# Serial LIST_INT64 Field Update
|
1270
|
+
class FU_LI
|
1271
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1272
|
+
CTRL = 1
|
1273
|
+
OP = 2
|
1274
|
+
POS = 3
|
1275
|
+
V = 4
|
1276
|
+
|
1277
|
+
FIELDS = {
|
1278
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1279
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1280
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1281
|
+
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::FU_INT64}}
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
def struct_fields; FIELDS; end
|
1285
|
+
|
1286
|
+
def validate
|
1287
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1288
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1289
|
+
end
|
1290
|
+
end
|
1291
|
+
|
1292
|
+
::Thrift::Struct.generate_accessors self
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# Serial LIST_BYTES Field Update
|
1296
|
+
class FU_LB
|
1297
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1298
|
+
CTRL = 1
|
1299
|
+
OP = 2
|
1300
|
+
POS = 3
|
1301
|
+
V = 4
|
1302
|
+
|
1303
|
+
FIELDS = {
|
1304
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1305
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1306
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1307
|
+
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::FU_BYTES}}
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
def struct_fields; FIELDS; end
|
1311
|
+
|
1312
|
+
def validate
|
1313
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1314
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1315
|
+
end
|
1316
|
+
end
|
1317
|
+
|
1318
|
+
::Thrift::Struct.generate_accessors self
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
# The Serial Values Cell field with Update Operation
|
1322
|
+
class CellValueSerialOp
|
1323
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1324
|
+
FIELD_ID = 1
|
1325
|
+
V_INT64 = 2
|
1326
|
+
V_DOUBLE = 3
|
1327
|
+
V_BYTES = 4
|
1328
|
+
V_KEY = 5
|
1329
|
+
V_LI = 6
|
1330
|
+
V_LB = 7
|
1331
|
+
|
1332
|
+
FIELDS = {
|
1333
|
+
# The Field ID, a single ID can have any/all the field types
|
1334
|
+
FIELD_ID => {:type => ::Thrift::Types::I32, :name => 'field_id'},
|
1335
|
+
# The INT64 type update-field
|
1336
|
+
V_INT64 => {:type => ::Thrift::Types::STRUCT, :name => 'v_int64', :class => ::Swcdb::Thrift::Gen::FU_INT64, :optional => true},
|
1337
|
+
# The DOUBLE type update-field
|
1338
|
+
V_DOUBLE => {:type => ::Thrift::Types::STRUCT, :name => 'v_double', :class => ::Swcdb::Thrift::Gen::FU_DOUBLE, :optional => true},
|
1339
|
+
# The BYTES type update-field
|
1340
|
+
V_BYTES => {:type => ::Thrift::Types::STRUCT, :name => 'v_bytes', :class => ::Swcdb::Thrift::Gen::FU_BYTES, :optional => true},
|
1341
|
+
# The Cell KEY type update-field
|
1342
|
+
V_KEY => {:type => ::Thrift::Types::LIST, :name => 'v_key', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
|
1343
|
+
# The LIST INT64 type update-field
|
1344
|
+
V_LI => {:type => ::Thrift::Types::STRUCT, :name => 'v_li', :class => ::Swcdb::Thrift::Gen::FU_LI, :optional => true},
|
1345
|
+
# The LIST BYTES type update-field
|
1346
|
+
V_LB => {:type => ::Thrift::Types::STRUCT, :name => 'v_lb', :class => ::Swcdb::Thrift::Gen::FU_LB, :optional => true}
|
1347
|
+
}
|
1348
|
+
|
1349
|
+
def struct_fields; FIELDS; end
|
1350
|
+
|
1351
|
+
def validate
|
1352
|
+
end
|
1353
|
+
|
1354
|
+
::Thrift::Struct.generate_accessors self
|
1355
|
+
end
|
1356
|
+
|
1073
1357
|
# The Cell data for using with Update of SERIAL Column Type
|
1074
1358
|
class UCellSerial
|
1075
1359
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swcdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kashirin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thrift
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.17.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.17.0
|
27
27
|
description: The SWC-DB Ruby module 'swcdb'
|
28
28
|
email: kashirin.alex@gmail.com
|
29
29
|
executables: []
|