swcdb 0.5.10.0 → 0.5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/swcdb/thrift/gen/service.rb +276 -25
- data/lib/swcdb/thrift/gen/service_constants.rb +2 -0
- data/lib/swcdb/thrift/gen/service_types.rb +573 -270
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b94f134a11a7c22fe896fcadcac773ef204df4b11315b16fd0bace0cba37c72
|
4
|
+
data.tar.gz: a8cfc572a20f30d972a5ae2ed7f706856991f6a6430294283ed02de952211c05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 266af74bcf4954385529d9291ef8e088d42f3e3625b941b921f1ddbcd0a736b956f7c0af4f3f0f02303e5adeabaa2233576aa15f8f87a395683d83f6cdf94744
|
7
|
+
data.tar.gz: 5e4a2b32c81d03536d612869330c6b3ff00a74367f9c1cece439a64f13d3317f26f5eb8fdb5a9a7c2d77dc9d0b2ca256568f8ecad9bf301f0d8d31851505f292
|
@@ -61,6 +61,54 @@ module Swcdb
|
|
61
61
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_compact_columns failed: unknown result')
|
62
62
|
end
|
63
63
|
|
64
|
+
def sql_select_plain(sql)
|
65
|
+
send_sql_select_plain(sql)
|
66
|
+
return recv_sql_select_plain()
|
67
|
+
end
|
68
|
+
|
69
|
+
def send_sql_select_plain(sql)
|
70
|
+
send_message('sql_select_plain', Sql_select_plain_args, :sql => sql)
|
71
|
+
end
|
72
|
+
|
73
|
+
def recv_sql_select_plain()
|
74
|
+
result = receive_message(Sql_select_plain_result)
|
75
|
+
return result.success unless result.success.nil?
|
76
|
+
raise result.e unless result.e.nil?
|
77
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_select_plain failed: unknown result')
|
78
|
+
end
|
79
|
+
|
80
|
+
def sql_select_counter(sql)
|
81
|
+
send_sql_select_counter(sql)
|
82
|
+
return recv_sql_select_counter()
|
83
|
+
end
|
84
|
+
|
85
|
+
def send_sql_select_counter(sql)
|
86
|
+
send_message('sql_select_counter', Sql_select_counter_args, :sql => sql)
|
87
|
+
end
|
88
|
+
|
89
|
+
def recv_sql_select_counter()
|
90
|
+
result = receive_message(Sql_select_counter_result)
|
91
|
+
return result.success unless result.success.nil?
|
92
|
+
raise result.e unless result.e.nil?
|
93
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_select_counter failed: unknown result')
|
94
|
+
end
|
95
|
+
|
96
|
+
def sql_select_serial(sql)
|
97
|
+
send_sql_select_serial(sql)
|
98
|
+
return recv_sql_select_serial()
|
99
|
+
end
|
100
|
+
|
101
|
+
def send_sql_select_serial(sql)
|
102
|
+
send_message('sql_select_serial', Sql_select_serial_args, :sql => sql)
|
103
|
+
end
|
104
|
+
|
105
|
+
def recv_sql_select_serial()
|
106
|
+
result = receive_message(Sql_select_serial_result)
|
107
|
+
return result.success unless result.success.nil?
|
108
|
+
raise result.e unless result.e.nil?
|
109
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_select_serial failed: unknown result')
|
110
|
+
end
|
111
|
+
|
64
112
|
def sql_select(sql)
|
65
113
|
send_sql_select(sql)
|
66
114
|
return recv_sql_select()
|
@@ -203,17 +251,32 @@ module Swcdb
|
|
203
251
|
return
|
204
252
|
end
|
205
253
|
|
206
|
-
def
|
207
|
-
|
208
|
-
|
254
|
+
def update_plain(cells, updater_id)
|
255
|
+
send_update_plain(cells, updater_id)
|
256
|
+
recv_update_plain()
|
257
|
+
end
|
258
|
+
|
259
|
+
def send_update_plain(cells, updater_id)
|
260
|
+
send_message('update_plain', Update_plain_args, :cells => cells, :updater_id => updater_id)
|
261
|
+
end
|
262
|
+
|
263
|
+
def recv_update_plain()
|
264
|
+
result = receive_message(Update_plain_result)
|
265
|
+
raise result.e unless result.e.nil?
|
266
|
+
return
|
267
|
+
end
|
268
|
+
|
269
|
+
def update_counter(cells, updater_id)
|
270
|
+
send_update_counter(cells, updater_id)
|
271
|
+
recv_update_counter()
|
209
272
|
end
|
210
273
|
|
211
|
-
def
|
212
|
-
send_message('
|
274
|
+
def send_update_counter(cells, updater_id)
|
275
|
+
send_message('update_counter', Update_counter_args, :cells => cells, :updater_id => updater_id)
|
213
276
|
end
|
214
277
|
|
215
|
-
def
|
216
|
-
result = receive_message(
|
278
|
+
def recv_update_counter()
|
279
|
+
result = receive_message(Update_counter_result)
|
217
280
|
raise result.e unless result.e.nil?
|
218
281
|
return
|
219
282
|
end
|
@@ -233,13 +296,13 @@ module Swcdb
|
|
233
296
|
return
|
234
297
|
end
|
235
298
|
|
236
|
-
def update_by_types(plain, serial, updater_id)
|
237
|
-
send_update_by_types(plain, serial, updater_id)
|
299
|
+
def update_by_types(plain, counter, serial, updater_id)
|
300
|
+
send_update_by_types(plain, counter, serial, updater_id)
|
238
301
|
recv_update_by_types()
|
239
302
|
end
|
240
303
|
|
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)
|
304
|
+
def send_update_by_types(plain, counter, serial, updater_id)
|
305
|
+
send_message('update_by_types', Update_by_types_args, :plain => plain, :counter => counter, :serial => serial, :updater_id => updater_id)
|
243
306
|
end
|
244
307
|
|
245
308
|
def recv_update_by_types()
|
@@ -413,6 +476,39 @@ module Swcdb
|
|
413
476
|
write_result(result, oprot, 'sql_compact_columns', seqid)
|
414
477
|
end
|
415
478
|
|
479
|
+
def process_sql_select_plain(seqid, iprot, oprot)
|
480
|
+
args = read_args(iprot, Sql_select_plain_args)
|
481
|
+
result = Sql_select_plain_result.new()
|
482
|
+
begin
|
483
|
+
result.success = @handler.sql_select_plain(args.sql)
|
484
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
485
|
+
result.e = e
|
486
|
+
end
|
487
|
+
write_result(result, oprot, 'sql_select_plain', seqid)
|
488
|
+
end
|
489
|
+
|
490
|
+
def process_sql_select_counter(seqid, iprot, oprot)
|
491
|
+
args = read_args(iprot, Sql_select_counter_args)
|
492
|
+
result = Sql_select_counter_result.new()
|
493
|
+
begin
|
494
|
+
result.success = @handler.sql_select_counter(args.sql)
|
495
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
496
|
+
result.e = e
|
497
|
+
end
|
498
|
+
write_result(result, oprot, 'sql_select_counter', seqid)
|
499
|
+
end
|
500
|
+
|
501
|
+
def process_sql_select_serial(seqid, iprot, oprot)
|
502
|
+
args = read_args(iprot, Sql_select_serial_args)
|
503
|
+
result = Sql_select_serial_result.new()
|
504
|
+
begin
|
505
|
+
result.success = @handler.sql_select_serial(args.sql)
|
506
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
507
|
+
result.e = e
|
508
|
+
end
|
509
|
+
write_result(result, oprot, 'sql_select_serial', seqid)
|
510
|
+
end
|
511
|
+
|
416
512
|
def process_sql_select(seqid, iprot, oprot)
|
417
513
|
args = read_args(iprot, Sql_select_args)
|
418
514
|
result = Sql_select_result.new()
|
@@ -512,15 +608,26 @@ module Swcdb
|
|
512
608
|
write_result(result, oprot, 'updater_close', seqid)
|
513
609
|
end
|
514
610
|
|
515
|
-
def
|
516
|
-
args = read_args(iprot,
|
517
|
-
result =
|
611
|
+
def process_update_plain(seqid, iprot, oprot)
|
612
|
+
args = read_args(iprot, Update_plain_args)
|
613
|
+
result = Update_plain_result.new()
|
614
|
+
begin
|
615
|
+
@handler.update_plain(args.cells, args.updater_id)
|
616
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
617
|
+
result.e = e
|
618
|
+
end
|
619
|
+
write_result(result, oprot, 'update_plain', seqid)
|
620
|
+
end
|
621
|
+
|
622
|
+
def process_update_counter(seqid, iprot, oprot)
|
623
|
+
args = read_args(iprot, Update_counter_args)
|
624
|
+
result = Update_counter_result.new()
|
518
625
|
begin
|
519
|
-
@handler.
|
626
|
+
@handler.update_counter(args.cells, args.updater_id)
|
520
627
|
rescue ::Swcdb::Thrift::Gen::Exception => e
|
521
628
|
result.e = e
|
522
629
|
end
|
523
|
-
write_result(result, oprot, '
|
630
|
+
write_result(result, oprot, 'update_counter', seqid)
|
524
631
|
end
|
525
632
|
|
526
633
|
def process_update_serial(seqid, iprot, oprot)
|
@@ -538,7 +645,7 @@ module Swcdb
|
|
538
645
|
args = read_args(iprot, Update_by_types_args)
|
539
646
|
result = Update_by_types_result.new()
|
540
647
|
begin
|
541
|
-
@handler.update_by_types(args.plain, args.serial, args.updater_id)
|
648
|
+
@handler.update_by_types(args.plain, args.counter, args.serial, args.updater_id)
|
542
649
|
rescue ::Swcdb::Thrift::Gen::Exception => e
|
543
650
|
result.e = e
|
544
651
|
end
|
@@ -740,6 +847,111 @@ module Swcdb
|
|
740
847
|
::Thrift::Struct.generate_accessors self
|
741
848
|
end
|
742
849
|
|
850
|
+
class Sql_select_plain_args
|
851
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
852
|
+
SQL = 1
|
853
|
+
|
854
|
+
FIELDS = {
|
855
|
+
# The SQL string to Execute
|
856
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
857
|
+
}
|
858
|
+
|
859
|
+
def struct_fields; FIELDS; end
|
860
|
+
|
861
|
+
def validate
|
862
|
+
end
|
863
|
+
|
864
|
+
::Thrift::Struct.generate_accessors self
|
865
|
+
end
|
866
|
+
|
867
|
+
class Sql_select_plain_result
|
868
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
869
|
+
SUCCESS = 0
|
870
|
+
E = 1
|
871
|
+
|
872
|
+
FIELDS = {
|
873
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellPlain}},
|
874
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
875
|
+
}
|
876
|
+
|
877
|
+
def struct_fields; FIELDS; end
|
878
|
+
|
879
|
+
def validate
|
880
|
+
end
|
881
|
+
|
882
|
+
::Thrift::Struct.generate_accessors self
|
883
|
+
end
|
884
|
+
|
885
|
+
class Sql_select_counter_args
|
886
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
887
|
+
SQL = 1
|
888
|
+
|
889
|
+
FIELDS = {
|
890
|
+
# The SQL string to Execute
|
891
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
892
|
+
}
|
893
|
+
|
894
|
+
def struct_fields; FIELDS; end
|
895
|
+
|
896
|
+
def validate
|
897
|
+
end
|
898
|
+
|
899
|
+
::Thrift::Struct.generate_accessors self
|
900
|
+
end
|
901
|
+
|
902
|
+
class Sql_select_counter_result
|
903
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
904
|
+
SUCCESS = 0
|
905
|
+
E = 1
|
906
|
+
|
907
|
+
FIELDS = {
|
908
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellCounter}},
|
909
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
910
|
+
}
|
911
|
+
|
912
|
+
def struct_fields; FIELDS; end
|
913
|
+
|
914
|
+
def validate
|
915
|
+
end
|
916
|
+
|
917
|
+
::Thrift::Struct.generate_accessors self
|
918
|
+
end
|
919
|
+
|
920
|
+
class Sql_select_serial_args
|
921
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
922
|
+
SQL = 1
|
923
|
+
|
924
|
+
FIELDS = {
|
925
|
+
# The SQL string to Execute
|
926
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
927
|
+
}
|
928
|
+
|
929
|
+
def struct_fields; FIELDS; end
|
930
|
+
|
931
|
+
def validate
|
932
|
+
end
|
933
|
+
|
934
|
+
::Thrift::Struct.generate_accessors self
|
935
|
+
end
|
936
|
+
|
937
|
+
class Sql_select_serial_result
|
938
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
939
|
+
SUCCESS = 0
|
940
|
+
E = 1
|
941
|
+
|
942
|
+
FIELDS = {
|
943
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CellSerial}},
|
944
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
945
|
+
}
|
946
|
+
|
947
|
+
def struct_fields; FIELDS; end
|
948
|
+
|
949
|
+
def validate
|
950
|
+
end
|
951
|
+
|
952
|
+
::Thrift::Struct.generate_accessors self
|
953
|
+
end
|
954
|
+
|
743
955
|
class Sql_select_args
|
744
956
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
745
957
|
SQL = 1
|
@@ -798,7 +1010,7 @@ module Swcdb
|
|
798
1010
|
E = 1
|
799
1011
|
|
800
1012
|
FIELDS = {
|
801
|
-
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::
|
1013
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CCells}},
|
802
1014
|
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
803
1015
|
}
|
804
1016
|
|
@@ -1060,14 +1272,50 @@ module Swcdb
|
|
1060
1272
|
::Thrift::Struct.generate_accessors self
|
1061
1273
|
end
|
1062
1274
|
|
1063
|
-
class
|
1275
|
+
class Update_plain_args
|
1064
1276
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1065
1277
|
CELLS = 1
|
1066
1278
|
UPDATER_ID = 2
|
1067
1279
|
|
1068
1280
|
FIELDS = {
|
1069
1281
|
# The Cells to update
|
1070
|
-
CELLS => {:type => ::Thrift::Types::MAP, :name => 'cells', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::
|
1282
|
+
CELLS => {:type => ::Thrift::Types::MAP, :name => 'cells', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::UCellPlain}}},
|
1283
|
+
# The Updater ID to use for write
|
1284
|
+
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
def struct_fields; FIELDS; end
|
1288
|
+
|
1289
|
+
def validate
|
1290
|
+
end
|
1291
|
+
|
1292
|
+
::Thrift::Struct.generate_accessors self
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
class Update_plain_result
|
1296
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1297
|
+
E = 1
|
1298
|
+
|
1299
|
+
FIELDS = {
|
1300
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
def struct_fields; FIELDS; end
|
1304
|
+
|
1305
|
+
def validate
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
::Thrift::Struct.generate_accessors self
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
class Update_counter_args
|
1312
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1313
|
+
CELLS = 1
|
1314
|
+
UPDATER_ID = 2
|
1315
|
+
|
1316
|
+
FIELDS = {
|
1317
|
+
# The Counter Cells to update
|
1318
|
+
CELLS => {:type => ::Thrift::Types::MAP, :name => 'cells', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::UCellCounter}}},
|
1071
1319
|
# The Updater ID to use for write
|
1072
1320
|
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
1073
1321
|
}
|
@@ -1080,7 +1328,7 @@ module Swcdb
|
|
1080
1328
|
::Thrift::Struct.generate_accessors self
|
1081
1329
|
end
|
1082
1330
|
|
1083
|
-
class
|
1331
|
+
class Update_counter_result
|
1084
1332
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1085
1333
|
E = 1
|
1086
1334
|
|
@@ -1135,12 +1383,15 @@ module Swcdb
|
|
1135
1383
|
class Update_by_types_args
|
1136
1384
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1137
1385
|
PLAIN = 1
|
1138
|
-
|
1139
|
-
|
1386
|
+
COUNTER = 2
|
1387
|
+
SERIAL = 3
|
1388
|
+
UPDATER_ID = 4
|
1140
1389
|
|
1141
1390
|
FIELDS = {
|
1142
1391
|
# 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::
|
1392
|
+
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::UCellPlain}}},
|
1393
|
+
# The COUNTER Cells to update
|
1394
|
+
COUNTER => {:type => ::Thrift::Types::MAP, :name => 'counter', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::UCellCounter}}},
|
1144
1395
|
# The SERIAL Cells to update
|
1145
1396
|
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
1397
|
# The Updater ID to use for write
|
@@ -1338,7 +1589,7 @@ module Swcdb
|
|
1338
1589
|
E = 1
|
1339
1590
|
|
1340
1591
|
FIELDS = {
|
1341
|
-
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::
|
1592
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CCells}},
|
1342
1593
|
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1343
1594
|
}
|
1344
1595
|
|