bosrvclient 0.1.6 → 0.1.7

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
  SHA1:
3
- metadata.gz: 4b3a0b6d82cf02eefe7114726cac3b3b890b3bf6
4
- data.tar.gz: 9a541467a88ad9aa8d5ffd0def18ee08500fe8ad
3
+ metadata.gz: f830fe94c1d3d37bf2b1e8c6ce1867cbec8b6307
4
+ data.tar.gz: e02dd8c2cb39e93dd28d828000f5c5250de37699
5
5
  SHA512:
6
- metadata.gz: f901f5edcedd630eeb18370fd4ea34ae2f4e510125c5f7fffc19a03df6d5d8ba5ce1174b58ceb1a317b35af418e7085619b99e25d2bd567ae28d1fe1d54cbd6a
7
- data.tar.gz: 93036c1ed220187244261377f2fa1d92c579bf65087bbd4e38be08b42411a9c07c70960f881694acaf86ccfd3792525ed84723fa6008f1b1e0c7647c8af4d656
6
+ metadata.gz: 945e41967a1ef5fda505bf0739adbb525002ad0238f4d6900f2a797ec798ec541bd6c0cdf80135737c1366bbd0f1637c1bf7b962ac5a79f657281d1c163186b3
7
+ data.tar.gz: 76fe9149d538785041d12b8395257059ef7214348917ab3471028b28b6afabe0706a619f9535a293244c88b74fcc0279d63d56a367627d5816369c79349b662b
@@ -97,6 +97,23 @@ module Bosrv
97
97
  return
98
98
  end
99
99
 
100
+ def admin_execute(token, query_stmt, workspace, opts)
101
+ send_admin_execute(token, query_stmt, workspace, opts)
102
+ return recv_admin_execute()
103
+ end
104
+
105
+ def send_admin_execute(token, query_stmt, workspace, opts)
106
+ send_message('admin_execute', Admin_execute_args, :token => token, :query_stmt => query_stmt, :workspace => workspace, :opts => opts)
107
+ end
108
+
109
+ def recv_admin_execute()
110
+ result = receive_message(Admin_execute_result)
111
+ return result.success unless result.success.nil?
112
+ raise result.err unless result.err.nil?
113
+ raise result.arr unless result.arr.nil?
114
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'admin_execute failed: unknown result')
115
+ end
116
+
100
117
  def get_table_list(token, workspace)
101
118
  send_get_table_list(token, workspace)
102
119
  return recv_get_table_list()
@@ -271,6 +288,19 @@ module Bosrv
271
288
  write_result(result, oprot, 'cursor_close', seqid)
272
289
  end
273
290
 
291
+ def process_admin_execute(seqid, iprot, oprot)
292
+ args = read_args(iprot, Admin_execute_args)
293
+ result = Admin_execute_result.new()
294
+ begin
295
+ result.success = @handler.admin_execute(args.token, args.query_stmt, args.workspace, args.opts)
296
+ rescue ::Exc::ServiceError => err
297
+ result.err = err
298
+ rescue ::Exc::AuthError => arr
299
+ result.arr = arr
300
+ end
301
+ write_result(result, oprot, 'admin_execute', seqid)
302
+ end
303
+
274
304
  def process_get_table_list(seqid, iprot, oprot)
275
305
  args = read_args(iprot, Get_table_list_args)
276
306
  result = Get_table_list_result.new()
@@ -559,6 +589,48 @@ module Bosrv
559
589
  ::Thrift::Struct.generate_accessors self
560
590
  end
561
591
 
592
+ class Admin_execute_args
593
+ include ::Thrift::Struct, ::Thrift::Struct_Union
594
+ TOKEN = 1
595
+ QUERY_STMT = 2
596
+ WORKSPACE = 3
597
+ OPTS = 4
598
+
599
+ FIELDS = {
600
+ TOKEN => {:type => ::Thrift::Types::STRING, :name => 'token'},
601
+ QUERY_STMT => {:type => ::Thrift::Types::STRING, :name => 'query_stmt'},
602
+ WORKSPACE => {:type => ::Thrift::Types::STRING, :name => 'workspace'},
603
+ OPTS => {:type => ::Thrift::Types::STRING, :name => 'opts'}
604
+ }
605
+
606
+ def struct_fields; FIELDS; end
607
+
608
+ def validate
609
+ end
610
+
611
+ ::Thrift::Struct.generate_accessors self
612
+ end
613
+
614
+ class Admin_execute_result
615
+ include ::Thrift::Struct, ::Thrift::Struct_Union
616
+ SUCCESS = 0
617
+ ERR = 1
618
+ ARR = 2
619
+
620
+ FIELDS = {
621
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
622
+ ERR => {:type => ::Thrift::Types::STRUCT, :name => 'err', :class => ::Exc::ServiceError},
623
+ ARR => {:type => ::Thrift::Types::STRUCT, :name => 'arr', :class => ::Exc::AuthError}
624
+ }
625
+
626
+ def struct_fields; FIELDS; end
627
+
628
+ def validate
629
+ end
630
+
631
+ ::Thrift::Struct.generate_accessors self
632
+ end
633
+
562
634
  class Get_table_list_args
563
635
  include ::Thrift::Struct, ::Thrift::Struct_Union
564
636
  TOKEN = 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosrvclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Jen