swcdb 0.5.6.0 → 0.5.9.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 +1 -1
- data/lib/swcdb/thrift/gen/service_constants.rb +11 -1
- data/lib/swcdb/thrift/gen/service_types.rb +368 -3
- 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: d41102b7e109b988aa4a94e3ccc6da85e744d409088a2337c6c40c3553f59706
|
4
|
+
data.tar.gz: b9115fc94ddf5731570db6b7c12212b987cb12718795ee9670f0b0fa2f54f6dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7ad6bac8a2c322a188cb4c860b225dc71de8b202dc1ef179a1de215978280f1c552578f3d8d0c4c285fc7274d79882ad31e98ce2ac67685307d92a337713bd
|
7
|
+
data.tar.gz: 4641cab2067856f009dc2fb982892576b84fdc603b54a45109170c2da7b6094250b83ce8d06a2c0a4bcf6eba76ae006f9a9ad587e988597a88e0e03cd46dedf0
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.16.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -10,6 +10,16 @@ require 'swcdb/thrift/gen/service_types'
|
|
10
10
|
module Swcdb
|
11
11
|
module Thrift
|
12
12
|
module Gen
|
13
|
+
FU_CTRL_DEFAULT = 0
|
14
|
+
|
15
|
+
FU_CTRL_NO_ADD_FIELD = 1
|
16
|
+
|
17
|
+
FU_CTRL_DELETE_FIELD = 2
|
18
|
+
|
19
|
+
FU_CTRL_VALUE_SET = 4
|
20
|
+
|
21
|
+
FU_CTRL_VALUE_DEL = 8
|
22
|
+
|
13
23
|
end
|
14
24
|
end
|
15
25
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.16.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -131,6 +131,32 @@ module Swcdb
|
|
131
131
|
VALID_VALUES = Set.new([NONE, LIMIT_BY_KEYS, OFFSET_BY_KEYS, ONLY_KEYS, ONLY_DELETES]).freeze
|
132
132
|
end
|
133
133
|
|
134
|
+
module SpecIntervalOptions
|
135
|
+
# Update Bit Option
|
136
|
+
UPDATING = 4
|
137
|
+
# Delete Bit Option
|
138
|
+
DELETING = 8
|
139
|
+
VALUE_MAP = {4 => "UPDATING", 8 => "DELETING"}
|
140
|
+
VALID_VALUES = Set.new([UPDATING, DELETING]).freeze
|
141
|
+
end
|
142
|
+
|
143
|
+
module UpdateOP
|
144
|
+
# 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_)
|
145
|
+
REPLACE = 0
|
146
|
+
# The OP supported by column-types: PLAIN, SERIAL. Appends the update value to the cell's current
|
147
|
+
APPEND = 1
|
148
|
+
# The OP supported by column-types: PLAIN, SERIAL. Prepends the update value to the cell's current
|
149
|
+
PREPEND = 2
|
150
|
+
# The OP supported by column-type PLAIN. Inserts the update value at position in current value (appends if pos above value)
|
151
|
+
INSERT = 3
|
152
|
+
# The OP supported by column-type PLAIN. Overwrites the current value at position with new value (appends if pos above value)
|
153
|
+
OVERWRITE = 4
|
154
|
+
# The OP supported by column-type SERIAL. update is done by the inner serial-fields defintions
|
155
|
+
SERIAL = 5
|
156
|
+
VALUE_MAP = {0 => "REPLACE", 1 => "APPEND", 2 => "PREPEND", 3 => "INSERT", 4 => "OVERWRITE", 5 => "SERIAL"}
|
157
|
+
VALID_VALUES = Set.new([REPLACE, APPEND, PREPEND, INSERT, OVERWRITE, SERIAL]).freeze
|
158
|
+
end
|
159
|
+
|
134
160
|
module Flag
|
135
161
|
# Unknown/Undefined
|
136
162
|
NONE = 0
|
@@ -144,6 +170,42 @@ module Swcdb
|
|
144
170
|
VALID_VALUES = Set.new([NONE, INSERT, DELETE_LE, DELETE_EQ]).freeze
|
145
171
|
end
|
146
172
|
|
173
|
+
module FU_MATH_OP
|
174
|
+
# set field value to the new value
|
175
|
+
EQUAL = 0
|
176
|
+
# plus new value to field's value (negative number allowed)
|
177
|
+
PLUS = 1
|
178
|
+
# multiply current value by update value
|
179
|
+
MULTIPLY = 2
|
180
|
+
# divide current value by the new value (ignored at zero)
|
181
|
+
DIVIDE = 3
|
182
|
+
VALUE_MAP = {0 => "EQUAL", 1 => "PLUS", 2 => "MULTIPLY", 3 => "DIVIDE"}
|
183
|
+
VALID_VALUES = Set.new([EQUAL, PLUS, MULTIPLY, DIVIDE]).freeze
|
184
|
+
end
|
185
|
+
|
186
|
+
module FU_LIST_OP
|
187
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Replaces with the update value
|
188
|
+
REPLACE = 0
|
189
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Appends the update value to a field value
|
190
|
+
APPEND = 1
|
191
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Prepends the update value to a field value
|
192
|
+
PREPEND = 2
|
193
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Insert the update value at position in a field value (appends if pos above value)
|
194
|
+
INSERT = 3
|
195
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Overwrites a field value at position with new value (appends if pos above value)
|
196
|
+
OVERWRITE = 4
|
197
|
+
# Supported by field-types: BYTES, LIST_BYTES, LIST_INT64. Erases the position in a field value
|
198
|
+
ERASE = 5
|
199
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP
|
200
|
+
BY_UNIQUE = 6
|
201
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value items have CTRL_VALUE_SET/DEL OP and Comparator
|
202
|
+
BY_COND = 7
|
203
|
+
# Supported by field-types: LIST_BYTES, LIST_INT64. The field value is with Postion & OP in items
|
204
|
+
BY_INDEX = 8
|
205
|
+
VALUE_MAP = {0 => "REPLACE", 1 => "APPEND", 2 => "PREPEND", 3 => "INSERT", 4 => "OVERWRITE", 5 => "ERASE", 6 => "BY_UNIQUE", 7 => "BY_COND", 8 => "BY_INDEX"}
|
206
|
+
VALID_VALUES = Set.new([REPLACE, APPEND, PREPEND, INSERT, OVERWRITE, ERASE, BY_UNIQUE, BY_COND, BY_INDEX]).freeze
|
207
|
+
end
|
208
|
+
|
147
209
|
module CellsResult
|
148
210
|
# Correspond to result on Cells (Cells in list)
|
149
211
|
IN_LIST = 0
|
@@ -179,6 +241,12 @@ module Swcdb
|
|
179
241
|
|
180
242
|
class SpecValue; end
|
181
243
|
|
244
|
+
class SpecUpdateOP; end
|
245
|
+
|
246
|
+
class SpecIntervalUpdate; end
|
247
|
+
|
248
|
+
class SpecIntervalUpdateSerial; end
|
249
|
+
|
182
250
|
class SpecInterval; end
|
183
251
|
|
184
252
|
class SpecColumn; end
|
@@ -209,6 +277,18 @@ module Swcdb
|
|
209
277
|
|
210
278
|
class CellValueSerial; end
|
211
279
|
|
280
|
+
class FU_INT64; end
|
281
|
+
|
282
|
+
class FU_DOUBLE; end
|
283
|
+
|
284
|
+
class FU_BYTES; end
|
285
|
+
|
286
|
+
class FU_LI; end
|
287
|
+
|
288
|
+
class FU_LB; end
|
289
|
+
|
290
|
+
class CellValueSerialOp; end
|
291
|
+
|
212
292
|
class UCellSerial; end
|
213
293
|
|
214
294
|
class Cell; end
|
@@ -557,6 +637,92 @@ module Swcdb
|
|
557
637
|
::Thrift::Struct.generate_accessors self
|
558
638
|
end
|
559
639
|
|
640
|
+
class SpecUpdateOP
|
641
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
642
|
+
OP = 1
|
643
|
+
POS = 2
|
644
|
+
|
645
|
+
FIELDS = {
|
646
|
+
# The Operation of update
|
647
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :enum_class => ::Swcdb::Thrift::Gen::UpdateOP},
|
648
|
+
# The position/index of INSERT and OVERWRITE update operations
|
649
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true}
|
650
|
+
}
|
651
|
+
|
652
|
+
def struct_fields; FIELDS; end
|
653
|
+
|
654
|
+
def validate
|
655
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::UpdateOP::VALID_VALUES.include?(@op)
|
656
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
660
|
+
::Thrift::Struct.generate_accessors self
|
661
|
+
end
|
662
|
+
|
663
|
+
# The Value specs for an Updating Interval of 'updating' in SpecInterval
|
664
|
+
class SpecIntervalUpdate
|
665
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
666
|
+
V = 1
|
667
|
+
TS = 2
|
668
|
+
ENCODER = 3
|
669
|
+
UPDATE_OP = 4
|
670
|
+
|
671
|
+
FIELDS = {
|
672
|
+
# The value for the updated cell
|
673
|
+
V => {:type => ::Thrift::Types::STRING, :name => 'v', :binary => true},
|
674
|
+
# The timestamp for the updated cell NULL: MIN_INT64+1, AUTO:MIN_INT64+2 (or not-set)
|
675
|
+
TS => {:type => ::Thrift::Types::I64, :name => 'ts', :optional => true},
|
676
|
+
# Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD
|
677
|
+
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType},
|
678
|
+
# Optionally the operaton of value update
|
679
|
+
UPDATE_OP => {:type => ::Thrift::Types::STRUCT, :name => 'update_op', :class => ::Swcdb::Thrift::Gen::SpecUpdateOP, :optional => true}
|
680
|
+
}
|
681
|
+
|
682
|
+
def struct_fields; FIELDS; end
|
683
|
+
|
684
|
+
def validate
|
685
|
+
unless @encoder.nil? || ::Swcdb::Thrift::Gen::EncodingType::VALID_VALUES.include?(@encoder)
|
686
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field encoder!')
|
687
|
+
end
|
688
|
+
end
|
689
|
+
|
690
|
+
::Thrift::Struct.generate_accessors self
|
691
|
+
end
|
692
|
+
|
693
|
+
# The Value specs for an Updating Interval of 'updating' in SpecIntervalSerial
|
694
|
+
class SpecIntervalUpdateSerial
|
695
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
696
|
+
TS = 1
|
697
|
+
V = 2
|
698
|
+
V_OP = 3
|
699
|
+
ENCODER = 4
|
700
|
+
UPDATE_OP = 5
|
701
|
+
|
702
|
+
FIELDS = {
|
703
|
+
# The timestamp for the updated cell NULL: MIN_INT64-1, AUTO:MIN_INT64-1
|
704
|
+
TS => {:type => ::Thrift::Types::I64, :name => 'ts'},
|
705
|
+
# The values of serial-fields for the updated cell
|
706
|
+
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellValueSerial}},
|
707
|
+
# The values of serial-fields for the the SERIAL operation update
|
708
|
+
V_OP => {:type => ::Thrift::Types::LIST, :name => 'v_op', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellValueSerialOp}},
|
709
|
+
# Optionally the Cell Value Encoding Type: ZLIB/SNAPPY/ZSTD
|
710
|
+
ENCODER => {:type => ::Thrift::Types::I32, :name => 'encoder', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::EncodingType},
|
711
|
+
# Optionally the operaton of value update
|
712
|
+
UPDATE_OP => {:type => ::Thrift::Types::STRUCT, :name => 'update_op', :class => ::Swcdb::Thrift::Gen::SpecUpdateOP, :optional => true}
|
713
|
+
}
|
714
|
+
|
715
|
+
def struct_fields; FIELDS; end
|
716
|
+
|
717
|
+
def validate
|
718
|
+
unless @encoder.nil? || ::Swcdb::Thrift::Gen::EncodingType::VALID_VALUES.include?(@encoder)
|
719
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field encoder!')
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
::Thrift::Struct.generate_accessors self
|
724
|
+
end
|
725
|
+
|
560
726
|
# The Cells Interval Specifications with interval-scope Flags
|
561
727
|
class SpecInterval
|
562
728
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
@@ -569,6 +735,8 @@ module Swcdb
|
|
569
735
|
TS_START = 7
|
570
736
|
TS_FINISH = 8
|
571
737
|
FLAGS = 9
|
738
|
+
OPTIONS = 10
|
739
|
+
UPDATING = 11
|
572
740
|
|
573
741
|
FIELDS = {
|
574
742
|
# Begin of Ranges evaluation with this Key inclusive
|
@@ -588,12 +756,19 @@ module Swcdb
|
|
588
756
|
# The Timestamp Finish Spec, the finish of cells-interval timestamp match
|
589
757
|
TS_FINISH => {:type => ::Thrift::Types::STRUCT, :name => 'ts_finish', :class => ::Swcdb::Thrift::Gen::SpecTimestamp, :optional => true},
|
590
758
|
# The Interval Flags Specification
|
591
|
-
FLAGS => {:type => ::Thrift::Types::STRUCT, :name => 'flags', :class => ::Swcdb::Thrift::Gen::SpecFlags, :optional => true}
|
759
|
+
FLAGS => {:type => ::Thrift::Types::STRUCT, :name => 'flags', :class => ::Swcdb::Thrift::Gen::SpecFlags, :optional => true},
|
760
|
+
# The Interval Options Specification
|
761
|
+
OPTIONS => {:type => ::Thrift::Types::I32, :name => 'options', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::SpecIntervalOptions},
|
762
|
+
# The Value spec of an Updating Interval
|
763
|
+
UPDATING => {:type => ::Thrift::Types::STRUCT, :name => 'updating', :class => ::Swcdb::Thrift::Gen::SpecIntervalUpdate, :optional => true}
|
592
764
|
}
|
593
765
|
|
594
766
|
def struct_fields; FIELDS; end
|
595
767
|
|
596
768
|
def validate
|
769
|
+
unless @options.nil? || ::Swcdb::Thrift::Gen::SpecIntervalOptions::VALID_VALUES.include?(@options)
|
770
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field options!')
|
771
|
+
end
|
597
772
|
end
|
598
773
|
|
599
774
|
::Thrift::Struct.generate_accessors self
|
@@ -835,6 +1010,8 @@ module Swcdb
|
|
835
1010
|
TS_START = 7
|
836
1011
|
TS_FINISH = 8
|
837
1012
|
FLAGS = 9
|
1013
|
+
OPTIONS = 10
|
1014
|
+
UPDATING = 11
|
838
1015
|
|
839
1016
|
FIELDS = {
|
840
1017
|
# Begin of Ranges evaluation with this Key inclusive
|
@@ -854,12 +1031,19 @@ module Swcdb
|
|
854
1031
|
# The Timestamp Finish Spec, the finish of cells-interval timestamp match
|
855
1032
|
TS_FINISH => {:type => ::Thrift::Types::STRUCT, :name => 'ts_finish', :class => ::Swcdb::Thrift::Gen::SpecTimestamp, :optional => true},
|
856
1033
|
# The Interval Flags Specification
|
857
|
-
FLAGS => {:type => ::Thrift::Types::STRUCT, :name => 'flags', :class => ::Swcdb::Thrift::Gen::SpecFlags, :optional => true}
|
1034
|
+
FLAGS => {:type => ::Thrift::Types::STRUCT, :name => 'flags', :class => ::Swcdb::Thrift::Gen::SpecFlags, :optional => true},
|
1035
|
+
# The Interval Options Specification
|
1036
|
+
OPTIONS => {:type => ::Thrift::Types::I32, :name => 'options', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::SpecIntervalOptions},
|
1037
|
+
# The Serial-Value spec of an Updating Interval
|
1038
|
+
UPDATING => {:type => ::Thrift::Types::STRUCT, :name => 'updating', :class => ::Swcdb::Thrift::Gen::SpecIntervalUpdateSerial, :optional => true}
|
858
1039
|
}
|
859
1040
|
|
860
1041
|
def struct_fields; FIELDS; end
|
861
1042
|
|
862
1043
|
def validate
|
1044
|
+
unless @options.nil? || ::Swcdb::Thrift::Gen::SpecIntervalOptions::VALID_VALUES.include?(@options)
|
1045
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field options!')
|
1046
|
+
end
|
863
1047
|
end
|
864
1048
|
|
865
1049
|
::Thrift::Struct.generate_accessors self
|
@@ -985,6 +1169,187 @@ module Swcdb
|
|
985
1169
|
::Thrift::Struct.generate_accessors self
|
986
1170
|
end
|
987
1171
|
|
1172
|
+
# Serial INT64 Field Update
|
1173
|
+
class FU_INT64
|
1174
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1175
|
+
CTRL = 1
|
1176
|
+
OP = 2
|
1177
|
+
POS = 3
|
1178
|
+
COMP = 4
|
1179
|
+
V = 5
|
1180
|
+
|
1181
|
+
FIELDS = {
|
1182
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1183
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_MATH_OP},
|
1184
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1185
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1186
|
+
V => {:type => ::Thrift::Types::I64, :name => 'v'}
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
def struct_fields; FIELDS; end
|
1190
|
+
|
1191
|
+
def validate
|
1192
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_MATH_OP::VALID_VALUES.include?(@op)
|
1193
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1194
|
+
end
|
1195
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1196
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1197
|
+
end
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
::Thrift::Struct.generate_accessors self
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Serial DOUBLE Field Update
|
1204
|
+
class FU_DOUBLE
|
1205
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1206
|
+
CTRL = 1
|
1207
|
+
OP = 2
|
1208
|
+
POS = 3
|
1209
|
+
COMP = 4
|
1210
|
+
V = 5
|
1211
|
+
|
1212
|
+
FIELDS = {
|
1213
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1214
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_MATH_OP},
|
1215
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1216
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1217
|
+
V => {:type => ::Thrift::Types::DOUBLE, :name => 'v'}
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
def struct_fields; FIELDS; end
|
1221
|
+
|
1222
|
+
def validate
|
1223
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_MATH_OP::VALID_VALUES.include?(@op)
|
1224
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1225
|
+
end
|
1226
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1227
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1228
|
+
end
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
::Thrift::Struct.generate_accessors self
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
# Serial BYTES Field Update
|
1235
|
+
class FU_BYTES
|
1236
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1237
|
+
CTRL = 1
|
1238
|
+
OP = 2
|
1239
|
+
POS = 3
|
1240
|
+
COMP = 4
|
1241
|
+
V = 5
|
1242
|
+
|
1243
|
+
FIELDS = {
|
1244
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1245
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1246
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1247
|
+
COMP => {:type => ::Thrift::Types::I32, :name => 'comp', :optional => true, :enum_class => ::Swcdb::Thrift::Gen::Comp},
|
1248
|
+
V => {:type => ::Thrift::Types::STRING, :name => 'v', :binary => true}
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
def struct_fields; FIELDS; end
|
1252
|
+
|
1253
|
+
def validate
|
1254
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1255
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1256
|
+
end
|
1257
|
+
unless @comp.nil? || ::Swcdb::Thrift::Gen::Comp::VALID_VALUES.include?(@comp)
|
1258
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field comp!')
|
1259
|
+
end
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
::Thrift::Struct.generate_accessors self
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
# Serial LIST_INT64 Field Update
|
1266
|
+
class FU_LI
|
1267
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1268
|
+
CTRL = 1
|
1269
|
+
OP = 2
|
1270
|
+
POS = 3
|
1271
|
+
V = 4
|
1272
|
+
|
1273
|
+
FIELDS = {
|
1274
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1275
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1276
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1277
|
+
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::FU_INT64}}
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
def struct_fields; FIELDS; end
|
1281
|
+
|
1282
|
+
def validate
|
1283
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1284
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1285
|
+
end
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
::Thrift::Struct.generate_accessors self
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# Serial LIST_BYTES Field Update
|
1292
|
+
class FU_LB
|
1293
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1294
|
+
CTRL = 1
|
1295
|
+
OP = 2
|
1296
|
+
POS = 3
|
1297
|
+
V = 4
|
1298
|
+
|
1299
|
+
FIELDS = {
|
1300
|
+
CTRL => {:type => ::Thrift::Types::BYTE, :name => 'ctrl', :default => 0},
|
1301
|
+
OP => {:type => ::Thrift::Types::I32, :name => 'op', :default => 0, :enum_class => ::Swcdb::Thrift::Gen::FU_LIST_OP},
|
1302
|
+
POS => {:type => ::Thrift::Types::I32, :name => 'pos', :optional => true},
|
1303
|
+
V => {:type => ::Thrift::Types::LIST, :name => 'v', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::FU_BYTES}}
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
def struct_fields; FIELDS; end
|
1307
|
+
|
1308
|
+
def validate
|
1309
|
+
unless @op.nil? || ::Swcdb::Thrift::Gen::FU_LIST_OP::VALID_VALUES.include?(@op)
|
1310
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
|
1311
|
+
end
|
1312
|
+
end
|
1313
|
+
|
1314
|
+
::Thrift::Struct.generate_accessors self
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# The Serial Values Cell field with Update Operation
|
1318
|
+
class CellValueSerialOp
|
1319
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1320
|
+
FIELD_ID = 1
|
1321
|
+
V_INT64 = 2
|
1322
|
+
V_DOUBLE = 3
|
1323
|
+
V_BYTES = 4
|
1324
|
+
V_KEY = 5
|
1325
|
+
V_LI = 6
|
1326
|
+
V_LB = 7
|
1327
|
+
|
1328
|
+
FIELDS = {
|
1329
|
+
# The Field ID, a single ID can have any/all the field types
|
1330
|
+
FIELD_ID => {:type => ::Thrift::Types::I32, :name => 'field_id'},
|
1331
|
+
# The INT64 type update-field
|
1332
|
+
V_INT64 => {:type => ::Thrift::Types::STRUCT, :name => 'v_int64', :class => ::Swcdb::Thrift::Gen::FU_INT64, :optional => true},
|
1333
|
+
# The DOUBLE type update-field
|
1334
|
+
V_DOUBLE => {:type => ::Thrift::Types::STRUCT, :name => 'v_double', :class => ::Swcdb::Thrift::Gen::FU_DOUBLE, :optional => true},
|
1335
|
+
# The BYTES type update-field
|
1336
|
+
V_BYTES => {:type => ::Thrift::Types::STRUCT, :name => 'v_bytes', :class => ::Swcdb::Thrift::Gen::FU_BYTES, :optional => true},
|
1337
|
+
# The Cell KEY type update-field
|
1338
|
+
V_KEY => {:type => ::Thrift::Types::LIST, :name => 'v_key', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
|
1339
|
+
# The LIST INT64 type update-field
|
1340
|
+
V_LI => {:type => ::Thrift::Types::STRUCT, :name => 'v_li', :class => ::Swcdb::Thrift::Gen::FU_LI, :optional => true},
|
1341
|
+
# The LIST BYTES type update-field
|
1342
|
+
V_LB => {:type => ::Thrift::Types::STRUCT, :name => 'v_lb', :class => ::Swcdb::Thrift::Gen::FU_LB, :optional => true}
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
def struct_fields; FIELDS; end
|
1346
|
+
|
1347
|
+
def validate
|
1348
|
+
end
|
1349
|
+
|
1350
|
+
::Thrift::Struct.generate_accessors self
|
1351
|
+
end
|
1352
|
+
|
988
1353
|
# The Cell data for using with Update of SERIAL Column Type
|
989
1354
|
class UCellSerial
|
990
1355
|
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.9.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:
|
11
|
+
date: 2022-05-21 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.16.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.16.0
|
27
27
|
description: The SWC-DB Ruby module 'swcdb'
|
28
28
|
email: kashirin.alex@gmail.com
|
29
29
|
executables: []
|