swcdb 0.5.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d41102b7e109b988aa4a94e3ccc6da85e744d409088a2337c6c40c3553f59706
4
- data.tar.gz: b9115fc94ddf5731570db6b7c12212b987cb12718795ee9670f0b0fa2f54f6dc
3
+ metadata.gz: 5b94f134a11a7c22fe896fcadcac773ef204df4b11315b16fd0bace0cba37c72
4
+ data.tar.gz: a8cfc572a20f30d972a5ae2ed7f706856991f6a6430294283ed02de952211c05
5
5
  SHA512:
6
- metadata.gz: 0a7ad6bac8a2c322a188cb4c860b225dc71de8b202dc1ef179a1de215978280f1c552578f3d8d0c4c285fc7274d79882ad31e98ce2ac67685307d92a337713bd
7
- data.tar.gz: 4641cab2067856f009dc2fb982892576b84fdc603b54a45109170c2da7b6094250b83ce8d06a2c0a4bcf6eba76ae006f9a9ad587e988597a88e0e03cd46dedf0
6
+ metadata.gz: 266af74bcf4954385529d9291ef8e088d42f3e3625b941b921f1ddbcd0a736b956f7c0af4f3f0f02303e5adeabaa2233576aa15f8f87a395683d83f6cdf94744
7
+ data.tar.gz: 5e4a2b32c81d03536d612869330c6b3ff00a74367f9c1cece439a64f13d3317f26f5eb8fdb5a9a7c2d77dc9d0b2ca256568f8ecad9bf301f0d8d31851505f292
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.16.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
  #
@@ -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 update(cells, updater_id)
207
- send_update(cells, updater_id)
208
- recv_update()
254
+ def update_plain(cells, updater_id)
255
+ send_update_plain(cells, updater_id)
256
+ recv_update_plain()
209
257
  end
210
258
 
211
- def send_update(cells, updater_id)
212
- send_message('update', Update_args, :cells => cells, :updater_id => updater_id)
259
+ def send_update_plain(cells, updater_id)
260
+ send_message('update_plain', Update_plain_args, :cells => cells, :updater_id => updater_id)
213
261
  end
214
262
 
215
- def recv_update()
216
- result = receive_message(Update_result)
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()
272
+ end
273
+
274
+ def send_update_counter(cells, updater_id)
275
+ send_message('update_counter', Update_counter_args, :cells => cells, :updater_id => updater_id)
276
+ end
277
+
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,6 +296,21 @@ module Swcdb
233
296
  return
234
297
  end
235
298
 
299
+ def update_by_types(plain, counter, serial, updater_id)
300
+ send_update_by_types(plain, counter, serial, updater_id)
301
+ recv_update_by_types()
302
+ end
303
+
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)
306
+ end
307
+
308
+ def recv_update_by_types()
309
+ result = receive_message(Update_by_types_result)
310
+ raise result.e unless result.e.nil?
311
+ return
312
+ end
313
+
236
314
  def mng_column(func, schema)
237
315
  send_mng_column(func, schema)
238
316
  recv_mng_column()
@@ -398,6 +476,39 @@ module Swcdb
398
476
  write_result(result, oprot, 'sql_compact_columns', seqid)
399
477
  end
400
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
+
401
512
  def process_sql_select(seqid, iprot, oprot)
402
513
  args = read_args(iprot, Sql_select_args)
403
514
  result = Sql_select_result.new()
@@ -497,15 +608,26 @@ module Swcdb
497
608
  write_result(result, oprot, 'updater_close', seqid)
498
609
  end
499
610
 
500
- def process_update(seqid, iprot, oprot)
501
- args = read_args(iprot, Update_args)
502
- result = Update_result.new()
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()
503
625
  begin
504
- @handler.update(args.cells, args.updater_id)
626
+ @handler.update_counter(args.cells, args.updater_id)
505
627
  rescue ::Swcdb::Thrift::Gen::Exception => e
506
628
  result.e = e
507
629
  end
508
- write_result(result, oprot, 'update', seqid)
630
+ write_result(result, oprot, 'update_counter', seqid)
509
631
  end
510
632
 
511
633
  def process_update_serial(seqid, iprot, oprot)
@@ -519,6 +641,17 @@ module Swcdb
519
641
  write_result(result, oprot, 'update_serial', seqid)
520
642
  end
521
643
 
644
+ def process_update_by_types(seqid, iprot, oprot)
645
+ args = read_args(iprot, Update_by_types_args)
646
+ result = Update_by_types_result.new()
647
+ begin
648
+ @handler.update_by_types(args.plain, args.counter, args.serial, args.updater_id)
649
+ rescue ::Swcdb::Thrift::Gen::Exception => e
650
+ result.e = e
651
+ end
652
+ write_result(result, oprot, 'update_by_types', seqid)
653
+ end
654
+
522
655
  def process_mng_column(seqid, iprot, oprot)
523
656
  args = read_args(iprot, Mng_column_args)
524
657
  result = Mng_column_result.new()
@@ -714,6 +847,111 @@ module Swcdb
714
847
  ::Thrift::Struct.generate_accessors self
715
848
  end
716
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
+
717
955
  class Sql_select_args
718
956
  include ::Thrift::Struct, ::Thrift::Struct_Union
719
957
  SQL = 1
@@ -772,7 +1010,7 @@ module Swcdb
772
1010
  E = 1
773
1011
 
774
1012
  FIELDS = {
775
- SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::ColCells}},
1013
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CCells}},
776
1014
  E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
777
1015
  }
778
1016
 
@@ -1034,14 +1272,50 @@ module Swcdb
1034
1272
  ::Thrift::Struct.generate_accessors self
1035
1273
  end
1036
1274
 
1037
- class Update_args
1275
+ class Update_plain_args
1038
1276
  include ::Thrift::Struct, ::Thrift::Struct_Union
1039
1277
  CELLS = 1
1040
1278
  UPDATER_ID = 2
1041
1279
 
1042
1280
  FIELDS = {
1043
1281
  # The Cells to update
1044
- 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::UCell}}},
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}}},
1045
1319
  # The Updater ID to use for write
1046
1320
  UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
1047
1321
  }
@@ -1054,7 +1328,7 @@ module Swcdb
1054
1328
  ::Thrift::Struct.generate_accessors self
1055
1329
  end
1056
1330
 
1057
- class Update_result
1331
+ class Update_counter_result
1058
1332
  include ::Thrift::Struct, ::Thrift::Struct_Union
1059
1333
  E = 1
1060
1334
 
@@ -1106,6 +1380,48 @@ module Swcdb
1106
1380
  ::Thrift::Struct.generate_accessors self
1107
1381
  end
1108
1382
 
1383
+ class Update_by_types_args
1384
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1385
+ PLAIN = 1
1386
+ COUNTER = 2
1387
+ SERIAL = 3
1388
+ UPDATER_ID = 4
1389
+
1390
+ FIELDS = {
1391
+ # The PLAIN Cells to update
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}}},
1395
+ # The SERIAL Cells to update
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}}},
1397
+ # The Updater ID to use for write
1398
+ UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
1399
+ }
1400
+
1401
+ def struct_fields; FIELDS; end
1402
+
1403
+ def validate
1404
+ end
1405
+
1406
+ ::Thrift::Struct.generate_accessors self
1407
+ end
1408
+
1409
+ class Update_by_types_result
1410
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1411
+ E = 1
1412
+
1413
+ FIELDS = {
1414
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
1415
+ }
1416
+
1417
+ def struct_fields; FIELDS; end
1418
+
1419
+ def validate
1420
+ end
1421
+
1422
+ ::Thrift::Struct.generate_accessors self
1423
+ end
1424
+
1109
1425
  class Mng_column_args
1110
1426
  include ::Thrift::Struct, ::Thrift::Struct_Union
1111
1427
  FUNC = 1
@@ -1273,7 +1589,7 @@ module Swcdb
1273
1589
  E = 1
1274
1590
 
1275
1591
  FIELDS = {
1276
- SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::ColCells}},
1592
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CCells}},
1277
1593
  E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
1278
1594
  }
1279
1595
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.16.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,12 @@ 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
+ COUNTER_OP_EQUAL = 1
18
+
13
19
  FU_CTRL_DEFAULT = 0
14
20
 
15
21
  FU_CTRL_NO_ADD_FIELD = 1