swcdb 0.5.4.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 +7 -0
- data/README.md +14 -0
- data/lib/swcdb/thrift/client.rb +58 -0
- data/lib/swcdb/thrift/gen/service.rb +1404 -0
- data/lib/swcdb/thrift/gen/service_constants.rb +15 -0
- data/lib/swcdb/thrift/gen/service_types.rb +1389 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eae6442dc95079726f272f0be2f8120c785c322c0e59997ae74df9fd78c3c0f2
|
4
|
+
data.tar.gz: f798d7b04ab5a26b505a28c941fd9f59061fb487f6429eed97ea2267e13427b3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e6f2f76f418b0d8ae9e98e798c5e7e390b1cbb15f3c9ea7270b63cf575811724c340a46a70f538ba7fe4cfee7fc06129bf58ea97dc5c8f9b19cfb0d512f693a4
|
7
|
+
data.tar.gz: 0a8c9ecde516a1872f8362efe46fb8522069b38d71f288c05f77cc3c2ebb46405b390e82459f21d95d6b1db2e3f9a68fe5fe24b73323dafa225cf9be06311e7e
|
data/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# The SWC-DB Ruby Package
|
4
|
+
|
5
|
+
The Ruby modules for working with [SWC-DB](https://www.swcdb.org).
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
**Documentations are available at:**
|
10
|
+
|
11
|
+
* https://www.swcdb.org/use/thriftclient/ruby/
|
12
|
+
|
13
|
+
* https://kashirin-alex.github.io/swc-db/use/thriftclient/ruby/
|
14
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'swcdb/thrift/gen/service'
|
2
|
+
# require 'thrift/protocol/binary_protocol_accelerated'
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
module Swcdb
|
7
|
+
module Thrift
|
8
|
+
# The SWC-DB Thrift Client
|
9
|
+
class Client < Gen::Service::Client
|
10
|
+
|
11
|
+
# SWC-DB Thrift Client initializer
|
12
|
+
#
|
13
|
+
# Example:
|
14
|
+
# # irb
|
15
|
+
# >> require 'swcdb/thrift/client'
|
16
|
+
# >> client = Swcdb::Thrift::Client.new("localhost", 18000)
|
17
|
+
# >> schemas = client.sql_list_columns("get columns 1,2,3,4")
|
18
|
+
#
|
19
|
+
# Arguments:
|
20
|
+
# @param [String] host
|
21
|
+
# @param [Integer] port
|
22
|
+
# @param [Integer] timeout_ms
|
23
|
+
# @param [Boolean] do_open
|
24
|
+
# @param [Boolean] framed
|
25
|
+
# @param [Boolean] accelerated
|
26
|
+
def initialize(host, port, timeout_ms = 900000, do_open = true, framed = true, accelerated = true)
|
27
|
+
socket = ::Thrift::Socket.new(host, port, timeout_ms)
|
28
|
+
|
29
|
+
if framed
|
30
|
+
@transport = ::Thrift::FramedTransport.new(socket)
|
31
|
+
else
|
32
|
+
@transport = ::Thrift::BufferedTransport.new(socket)
|
33
|
+
end
|
34
|
+
|
35
|
+
if accelerated
|
36
|
+
protocol = ::Thrift::BinaryProtocolAccelerated.new(@transport)
|
37
|
+
else
|
38
|
+
protocol = ::Thrift::BinaryProtocol.new(@transport)
|
39
|
+
end
|
40
|
+
|
41
|
+
super(protocol)
|
42
|
+
|
43
|
+
open() if do_open
|
44
|
+
end
|
45
|
+
|
46
|
+
# Open Client Connection
|
47
|
+
def open()
|
48
|
+
@transport.open()
|
49
|
+
end
|
50
|
+
|
51
|
+
# Close Client Connection
|
52
|
+
def close()
|
53
|
+
@transport.close()
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,1404 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.14.0)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'swcdb/thrift/gen/service_types'
|
9
|
+
|
10
|
+
module Swcdb
|
11
|
+
module Thrift
|
12
|
+
module Gen
|
13
|
+
module Service
|
14
|
+
class Client
|
15
|
+
include ::Thrift::Client
|
16
|
+
|
17
|
+
def sql_mng_column(sql)
|
18
|
+
send_sql_mng_column(sql)
|
19
|
+
recv_sql_mng_column()
|
20
|
+
end
|
21
|
+
|
22
|
+
def send_sql_mng_column(sql)
|
23
|
+
send_message('sql_mng_column', Sql_mng_column_args, :sql => sql)
|
24
|
+
end
|
25
|
+
|
26
|
+
def recv_sql_mng_column()
|
27
|
+
result = receive_message(Sql_mng_column_result)
|
28
|
+
raise result.e unless result.e.nil?
|
29
|
+
return
|
30
|
+
end
|
31
|
+
|
32
|
+
def sql_list_columns(sql)
|
33
|
+
send_sql_list_columns(sql)
|
34
|
+
return recv_sql_list_columns()
|
35
|
+
end
|
36
|
+
|
37
|
+
def send_sql_list_columns(sql)
|
38
|
+
send_message('sql_list_columns', Sql_list_columns_args, :sql => sql)
|
39
|
+
end
|
40
|
+
|
41
|
+
def recv_sql_list_columns()
|
42
|
+
result = receive_message(Sql_list_columns_result)
|
43
|
+
return result.success unless result.success.nil?
|
44
|
+
raise result.e unless result.e.nil?
|
45
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_list_columns failed: unknown result')
|
46
|
+
end
|
47
|
+
|
48
|
+
def sql_compact_columns(sql)
|
49
|
+
send_sql_compact_columns(sql)
|
50
|
+
return recv_sql_compact_columns()
|
51
|
+
end
|
52
|
+
|
53
|
+
def send_sql_compact_columns(sql)
|
54
|
+
send_message('sql_compact_columns', Sql_compact_columns_args, :sql => sql)
|
55
|
+
end
|
56
|
+
|
57
|
+
def recv_sql_compact_columns()
|
58
|
+
result = receive_message(Sql_compact_columns_result)
|
59
|
+
return result.success unless result.success.nil?
|
60
|
+
raise result.e unless result.e.nil?
|
61
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_compact_columns failed: unknown result')
|
62
|
+
end
|
63
|
+
|
64
|
+
def sql_select(sql)
|
65
|
+
send_sql_select(sql)
|
66
|
+
return recv_sql_select()
|
67
|
+
end
|
68
|
+
|
69
|
+
def send_sql_select(sql)
|
70
|
+
send_message('sql_select', Sql_select_args, :sql => sql)
|
71
|
+
end
|
72
|
+
|
73
|
+
def recv_sql_select()
|
74
|
+
result = receive_message(Sql_select_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 failed: unknown result')
|
78
|
+
end
|
79
|
+
|
80
|
+
def sql_select_rslt_on_column(sql)
|
81
|
+
send_sql_select_rslt_on_column(sql)
|
82
|
+
return recv_sql_select_rslt_on_column()
|
83
|
+
end
|
84
|
+
|
85
|
+
def send_sql_select_rslt_on_column(sql)
|
86
|
+
send_message('sql_select_rslt_on_column', Sql_select_rslt_on_column_args, :sql => sql)
|
87
|
+
end
|
88
|
+
|
89
|
+
def recv_sql_select_rslt_on_column()
|
90
|
+
result = receive_message(Sql_select_rslt_on_column_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_rslt_on_column failed: unknown result')
|
94
|
+
end
|
95
|
+
|
96
|
+
def sql_select_rslt_on_key(sql)
|
97
|
+
send_sql_select_rslt_on_key(sql)
|
98
|
+
return recv_sql_select_rslt_on_key()
|
99
|
+
end
|
100
|
+
|
101
|
+
def send_sql_select_rslt_on_key(sql)
|
102
|
+
send_message('sql_select_rslt_on_key', Sql_select_rslt_on_key_args, :sql => sql)
|
103
|
+
end
|
104
|
+
|
105
|
+
def recv_sql_select_rslt_on_key()
|
106
|
+
result = receive_message(Sql_select_rslt_on_key_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_rslt_on_key failed: unknown result')
|
110
|
+
end
|
111
|
+
|
112
|
+
def sql_select_rslt_on_fraction(sql)
|
113
|
+
send_sql_select_rslt_on_fraction(sql)
|
114
|
+
return recv_sql_select_rslt_on_fraction()
|
115
|
+
end
|
116
|
+
|
117
|
+
def send_sql_select_rslt_on_fraction(sql)
|
118
|
+
send_message('sql_select_rslt_on_fraction', Sql_select_rslt_on_fraction_args, :sql => sql)
|
119
|
+
end
|
120
|
+
|
121
|
+
def recv_sql_select_rslt_on_fraction()
|
122
|
+
result = receive_message(Sql_select_rslt_on_fraction_result)
|
123
|
+
return result.success unless result.success.nil?
|
124
|
+
raise result.e unless result.e.nil?
|
125
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_select_rslt_on_fraction failed: unknown result')
|
126
|
+
end
|
127
|
+
|
128
|
+
def sql_query(sql, rslt)
|
129
|
+
send_sql_query(sql, rslt)
|
130
|
+
return recv_sql_query()
|
131
|
+
end
|
132
|
+
|
133
|
+
def send_sql_query(sql, rslt)
|
134
|
+
send_message('sql_query', Sql_query_args, :sql => sql, :rslt => rslt)
|
135
|
+
end
|
136
|
+
|
137
|
+
def recv_sql_query()
|
138
|
+
result = receive_message(Sql_query_result)
|
139
|
+
return result.success unless result.success.nil?
|
140
|
+
raise result.e unless result.e.nil?
|
141
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'sql_query failed: unknown result')
|
142
|
+
end
|
143
|
+
|
144
|
+
def sql_update(sql, updater_id)
|
145
|
+
send_sql_update(sql, updater_id)
|
146
|
+
recv_sql_update()
|
147
|
+
end
|
148
|
+
|
149
|
+
def send_sql_update(sql, updater_id)
|
150
|
+
send_message('sql_update', Sql_update_args, :sql => sql, :updater_id => updater_id)
|
151
|
+
end
|
152
|
+
|
153
|
+
def recv_sql_update()
|
154
|
+
result = receive_message(Sql_update_result)
|
155
|
+
raise result.e unless result.e.nil?
|
156
|
+
return
|
157
|
+
end
|
158
|
+
|
159
|
+
def exec_sql(sql)
|
160
|
+
send_exec_sql(sql)
|
161
|
+
return recv_exec_sql()
|
162
|
+
end
|
163
|
+
|
164
|
+
def send_exec_sql(sql)
|
165
|
+
send_message('exec_sql', Exec_sql_args, :sql => sql)
|
166
|
+
end
|
167
|
+
|
168
|
+
def recv_exec_sql()
|
169
|
+
result = receive_message(Exec_sql_result)
|
170
|
+
return result.success unless result.success.nil?
|
171
|
+
raise result.e unless result.e.nil?
|
172
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exec_sql failed: unknown result')
|
173
|
+
end
|
174
|
+
|
175
|
+
def updater_create(buffer_size)
|
176
|
+
send_updater_create(buffer_size)
|
177
|
+
return recv_updater_create()
|
178
|
+
end
|
179
|
+
|
180
|
+
def send_updater_create(buffer_size)
|
181
|
+
send_message('updater_create', Updater_create_args, :buffer_size => buffer_size)
|
182
|
+
end
|
183
|
+
|
184
|
+
def recv_updater_create()
|
185
|
+
result = receive_message(Updater_create_result)
|
186
|
+
return result.success unless result.success.nil?
|
187
|
+
raise result.e unless result.e.nil?
|
188
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'updater_create failed: unknown result')
|
189
|
+
end
|
190
|
+
|
191
|
+
def updater_close(id)
|
192
|
+
send_updater_close(id)
|
193
|
+
recv_updater_close()
|
194
|
+
end
|
195
|
+
|
196
|
+
def send_updater_close(id)
|
197
|
+
send_message('updater_close', Updater_close_args, :id => id)
|
198
|
+
end
|
199
|
+
|
200
|
+
def recv_updater_close()
|
201
|
+
result = receive_message(Updater_close_result)
|
202
|
+
raise result.e unless result.e.nil?
|
203
|
+
return
|
204
|
+
end
|
205
|
+
|
206
|
+
def update(cells, updater_id)
|
207
|
+
send_update(cells, updater_id)
|
208
|
+
recv_update()
|
209
|
+
end
|
210
|
+
|
211
|
+
def send_update(cells, updater_id)
|
212
|
+
send_message('update', Update_args, :cells => cells, :updater_id => updater_id)
|
213
|
+
end
|
214
|
+
|
215
|
+
def recv_update()
|
216
|
+
result = receive_message(Update_result)
|
217
|
+
raise result.e unless result.e.nil?
|
218
|
+
return
|
219
|
+
end
|
220
|
+
|
221
|
+
def update_serial(cells, updater_id)
|
222
|
+
send_update_serial(cells, updater_id)
|
223
|
+
recv_update_serial()
|
224
|
+
end
|
225
|
+
|
226
|
+
def send_update_serial(cells, updater_id)
|
227
|
+
send_message('update_serial', Update_serial_args, :cells => cells, :updater_id => updater_id)
|
228
|
+
end
|
229
|
+
|
230
|
+
def recv_update_serial()
|
231
|
+
result = receive_message(Update_serial_result)
|
232
|
+
raise result.e unless result.e.nil?
|
233
|
+
return
|
234
|
+
end
|
235
|
+
|
236
|
+
def mng_column(func, schema)
|
237
|
+
send_mng_column(func, schema)
|
238
|
+
recv_mng_column()
|
239
|
+
end
|
240
|
+
|
241
|
+
def send_mng_column(func, schema)
|
242
|
+
send_message('mng_column', Mng_column_args, :func => func, :schema => schema)
|
243
|
+
end
|
244
|
+
|
245
|
+
def recv_mng_column()
|
246
|
+
result = receive_message(Mng_column_result)
|
247
|
+
raise result.e unless result.e.nil?
|
248
|
+
return
|
249
|
+
end
|
250
|
+
|
251
|
+
def list_columns(spec)
|
252
|
+
send_list_columns(spec)
|
253
|
+
return recv_list_columns()
|
254
|
+
end
|
255
|
+
|
256
|
+
def send_list_columns(spec)
|
257
|
+
send_message('list_columns', List_columns_args, :spec => spec)
|
258
|
+
end
|
259
|
+
|
260
|
+
def recv_list_columns()
|
261
|
+
result = receive_message(List_columns_result)
|
262
|
+
return result.success unless result.success.nil?
|
263
|
+
raise result.e unless result.e.nil?
|
264
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_columns failed: unknown result')
|
265
|
+
end
|
266
|
+
|
267
|
+
def compact_columns(spec)
|
268
|
+
send_compact_columns(spec)
|
269
|
+
return recv_compact_columns()
|
270
|
+
end
|
271
|
+
|
272
|
+
def send_compact_columns(spec)
|
273
|
+
send_message('compact_columns', Compact_columns_args, :spec => spec)
|
274
|
+
end
|
275
|
+
|
276
|
+
def recv_compact_columns()
|
277
|
+
result = receive_message(Compact_columns_result)
|
278
|
+
return result.success unless result.success.nil?
|
279
|
+
raise result.e unless result.e.nil?
|
280
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'compact_columns failed: unknown result')
|
281
|
+
end
|
282
|
+
|
283
|
+
def scan(spec)
|
284
|
+
send_scan(spec)
|
285
|
+
return recv_scan()
|
286
|
+
end
|
287
|
+
|
288
|
+
def send_scan(spec)
|
289
|
+
send_message('scan', Scan_args, :spec => spec)
|
290
|
+
end
|
291
|
+
|
292
|
+
def recv_scan()
|
293
|
+
result = receive_message(Scan_result)
|
294
|
+
return result.success unless result.success.nil?
|
295
|
+
raise result.e unless result.e.nil?
|
296
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scan failed: unknown result')
|
297
|
+
end
|
298
|
+
|
299
|
+
def scan_rslt_on_column(spec)
|
300
|
+
send_scan_rslt_on_column(spec)
|
301
|
+
return recv_scan_rslt_on_column()
|
302
|
+
end
|
303
|
+
|
304
|
+
def send_scan_rslt_on_column(spec)
|
305
|
+
send_message('scan_rslt_on_column', Scan_rslt_on_column_args, :spec => spec)
|
306
|
+
end
|
307
|
+
|
308
|
+
def recv_scan_rslt_on_column()
|
309
|
+
result = receive_message(Scan_rslt_on_column_result)
|
310
|
+
return result.success unless result.success.nil?
|
311
|
+
raise result.e unless result.e.nil?
|
312
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scan_rslt_on_column failed: unknown result')
|
313
|
+
end
|
314
|
+
|
315
|
+
def scan_rslt_on_key(spec)
|
316
|
+
send_scan_rslt_on_key(spec)
|
317
|
+
return recv_scan_rslt_on_key()
|
318
|
+
end
|
319
|
+
|
320
|
+
def send_scan_rslt_on_key(spec)
|
321
|
+
send_message('scan_rslt_on_key', Scan_rslt_on_key_args, :spec => spec)
|
322
|
+
end
|
323
|
+
|
324
|
+
def recv_scan_rslt_on_key()
|
325
|
+
result = receive_message(Scan_rslt_on_key_result)
|
326
|
+
return result.success unless result.success.nil?
|
327
|
+
raise result.e unless result.e.nil?
|
328
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scan_rslt_on_key failed: unknown result')
|
329
|
+
end
|
330
|
+
|
331
|
+
def scan_rslt_on_fraction(spec)
|
332
|
+
send_scan_rslt_on_fraction(spec)
|
333
|
+
return recv_scan_rslt_on_fraction()
|
334
|
+
end
|
335
|
+
|
336
|
+
def send_scan_rslt_on_fraction(spec)
|
337
|
+
send_message('scan_rslt_on_fraction', Scan_rslt_on_fraction_args, :spec => spec)
|
338
|
+
end
|
339
|
+
|
340
|
+
def recv_scan_rslt_on_fraction()
|
341
|
+
result = receive_message(Scan_rslt_on_fraction_result)
|
342
|
+
return result.success unless result.success.nil?
|
343
|
+
raise result.e unless result.e.nil?
|
344
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scan_rslt_on_fraction failed: unknown result')
|
345
|
+
end
|
346
|
+
|
347
|
+
def scan_rslt_on(spec, rslt)
|
348
|
+
send_scan_rslt_on(spec, rslt)
|
349
|
+
return recv_scan_rslt_on()
|
350
|
+
end
|
351
|
+
|
352
|
+
def send_scan_rslt_on(spec, rslt)
|
353
|
+
send_message('scan_rslt_on', Scan_rslt_on_args, :spec => spec, :rslt => rslt)
|
354
|
+
end
|
355
|
+
|
356
|
+
def recv_scan_rslt_on()
|
357
|
+
result = receive_message(Scan_rslt_on_result)
|
358
|
+
return result.success unless result.success.nil?
|
359
|
+
raise result.e unless result.e.nil?
|
360
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scan_rslt_on failed: unknown result')
|
361
|
+
end
|
362
|
+
|
363
|
+
end
|
364
|
+
|
365
|
+
class Processor
|
366
|
+
include ::Thrift::Processor
|
367
|
+
|
368
|
+
def process_sql_mng_column(seqid, iprot, oprot)
|
369
|
+
args = read_args(iprot, Sql_mng_column_args)
|
370
|
+
result = Sql_mng_column_result.new()
|
371
|
+
begin
|
372
|
+
@handler.sql_mng_column(args.sql)
|
373
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
374
|
+
result.e = e
|
375
|
+
end
|
376
|
+
write_result(result, oprot, 'sql_mng_column', seqid)
|
377
|
+
end
|
378
|
+
|
379
|
+
def process_sql_list_columns(seqid, iprot, oprot)
|
380
|
+
args = read_args(iprot, Sql_list_columns_args)
|
381
|
+
result = Sql_list_columns_result.new()
|
382
|
+
begin
|
383
|
+
result.success = @handler.sql_list_columns(args.sql)
|
384
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
385
|
+
result.e = e
|
386
|
+
end
|
387
|
+
write_result(result, oprot, 'sql_list_columns', seqid)
|
388
|
+
end
|
389
|
+
|
390
|
+
def process_sql_compact_columns(seqid, iprot, oprot)
|
391
|
+
args = read_args(iprot, Sql_compact_columns_args)
|
392
|
+
result = Sql_compact_columns_result.new()
|
393
|
+
begin
|
394
|
+
result.success = @handler.sql_compact_columns(args.sql)
|
395
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
396
|
+
result.e = e
|
397
|
+
end
|
398
|
+
write_result(result, oprot, 'sql_compact_columns', seqid)
|
399
|
+
end
|
400
|
+
|
401
|
+
def process_sql_select(seqid, iprot, oprot)
|
402
|
+
args = read_args(iprot, Sql_select_args)
|
403
|
+
result = Sql_select_result.new()
|
404
|
+
begin
|
405
|
+
result.success = @handler.sql_select(args.sql)
|
406
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
407
|
+
result.e = e
|
408
|
+
end
|
409
|
+
write_result(result, oprot, 'sql_select', seqid)
|
410
|
+
end
|
411
|
+
|
412
|
+
def process_sql_select_rslt_on_column(seqid, iprot, oprot)
|
413
|
+
args = read_args(iprot, Sql_select_rslt_on_column_args)
|
414
|
+
result = Sql_select_rslt_on_column_result.new()
|
415
|
+
begin
|
416
|
+
result.success = @handler.sql_select_rslt_on_column(args.sql)
|
417
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
418
|
+
result.e = e
|
419
|
+
end
|
420
|
+
write_result(result, oprot, 'sql_select_rslt_on_column', seqid)
|
421
|
+
end
|
422
|
+
|
423
|
+
def process_sql_select_rslt_on_key(seqid, iprot, oprot)
|
424
|
+
args = read_args(iprot, Sql_select_rslt_on_key_args)
|
425
|
+
result = Sql_select_rslt_on_key_result.new()
|
426
|
+
begin
|
427
|
+
result.success = @handler.sql_select_rslt_on_key(args.sql)
|
428
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
429
|
+
result.e = e
|
430
|
+
end
|
431
|
+
write_result(result, oprot, 'sql_select_rslt_on_key', seqid)
|
432
|
+
end
|
433
|
+
|
434
|
+
def process_sql_select_rslt_on_fraction(seqid, iprot, oprot)
|
435
|
+
args = read_args(iprot, Sql_select_rslt_on_fraction_args)
|
436
|
+
result = Sql_select_rslt_on_fraction_result.new()
|
437
|
+
begin
|
438
|
+
result.success = @handler.sql_select_rslt_on_fraction(args.sql)
|
439
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
440
|
+
result.e = e
|
441
|
+
end
|
442
|
+
write_result(result, oprot, 'sql_select_rslt_on_fraction', seqid)
|
443
|
+
end
|
444
|
+
|
445
|
+
def process_sql_query(seqid, iprot, oprot)
|
446
|
+
args = read_args(iprot, Sql_query_args)
|
447
|
+
result = Sql_query_result.new()
|
448
|
+
begin
|
449
|
+
result.success = @handler.sql_query(args.sql, args.rslt)
|
450
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
451
|
+
result.e = e
|
452
|
+
end
|
453
|
+
write_result(result, oprot, 'sql_query', seqid)
|
454
|
+
end
|
455
|
+
|
456
|
+
def process_sql_update(seqid, iprot, oprot)
|
457
|
+
args = read_args(iprot, Sql_update_args)
|
458
|
+
result = Sql_update_result.new()
|
459
|
+
begin
|
460
|
+
@handler.sql_update(args.sql, args.updater_id)
|
461
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
462
|
+
result.e = e
|
463
|
+
end
|
464
|
+
write_result(result, oprot, 'sql_update', seqid)
|
465
|
+
end
|
466
|
+
|
467
|
+
def process_exec_sql(seqid, iprot, oprot)
|
468
|
+
args = read_args(iprot, Exec_sql_args)
|
469
|
+
result = Exec_sql_result.new()
|
470
|
+
begin
|
471
|
+
result.success = @handler.exec_sql(args.sql)
|
472
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
473
|
+
result.e = e
|
474
|
+
end
|
475
|
+
write_result(result, oprot, 'exec_sql', seqid)
|
476
|
+
end
|
477
|
+
|
478
|
+
def process_updater_create(seqid, iprot, oprot)
|
479
|
+
args = read_args(iprot, Updater_create_args)
|
480
|
+
result = Updater_create_result.new()
|
481
|
+
begin
|
482
|
+
result.success = @handler.updater_create(args.buffer_size)
|
483
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
484
|
+
result.e = e
|
485
|
+
end
|
486
|
+
write_result(result, oprot, 'updater_create', seqid)
|
487
|
+
end
|
488
|
+
|
489
|
+
def process_updater_close(seqid, iprot, oprot)
|
490
|
+
args = read_args(iprot, Updater_close_args)
|
491
|
+
result = Updater_close_result.new()
|
492
|
+
begin
|
493
|
+
@handler.updater_close(args.id)
|
494
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
495
|
+
result.e = e
|
496
|
+
end
|
497
|
+
write_result(result, oprot, 'updater_close', seqid)
|
498
|
+
end
|
499
|
+
|
500
|
+
def process_update(seqid, iprot, oprot)
|
501
|
+
args = read_args(iprot, Update_args)
|
502
|
+
result = Update_result.new()
|
503
|
+
begin
|
504
|
+
@handler.update(args.cells, args.updater_id)
|
505
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
506
|
+
result.e = e
|
507
|
+
end
|
508
|
+
write_result(result, oprot, 'update', seqid)
|
509
|
+
end
|
510
|
+
|
511
|
+
def process_update_serial(seqid, iprot, oprot)
|
512
|
+
args = read_args(iprot, Update_serial_args)
|
513
|
+
result = Update_serial_result.new()
|
514
|
+
begin
|
515
|
+
@handler.update_serial(args.cells, args.updater_id)
|
516
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
517
|
+
result.e = e
|
518
|
+
end
|
519
|
+
write_result(result, oprot, 'update_serial', seqid)
|
520
|
+
end
|
521
|
+
|
522
|
+
def process_mng_column(seqid, iprot, oprot)
|
523
|
+
args = read_args(iprot, Mng_column_args)
|
524
|
+
result = Mng_column_result.new()
|
525
|
+
begin
|
526
|
+
@handler.mng_column(args.func, args.schema)
|
527
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
528
|
+
result.e = e
|
529
|
+
end
|
530
|
+
write_result(result, oprot, 'mng_column', seqid)
|
531
|
+
end
|
532
|
+
|
533
|
+
def process_list_columns(seqid, iprot, oprot)
|
534
|
+
args = read_args(iprot, List_columns_args)
|
535
|
+
result = List_columns_result.new()
|
536
|
+
begin
|
537
|
+
result.success = @handler.list_columns(args.spec)
|
538
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
539
|
+
result.e = e
|
540
|
+
end
|
541
|
+
write_result(result, oprot, 'list_columns', seqid)
|
542
|
+
end
|
543
|
+
|
544
|
+
def process_compact_columns(seqid, iprot, oprot)
|
545
|
+
args = read_args(iprot, Compact_columns_args)
|
546
|
+
result = Compact_columns_result.new()
|
547
|
+
begin
|
548
|
+
result.success = @handler.compact_columns(args.spec)
|
549
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
550
|
+
result.e = e
|
551
|
+
end
|
552
|
+
write_result(result, oprot, 'compact_columns', seqid)
|
553
|
+
end
|
554
|
+
|
555
|
+
def process_scan(seqid, iprot, oprot)
|
556
|
+
args = read_args(iprot, Scan_args)
|
557
|
+
result = Scan_result.new()
|
558
|
+
begin
|
559
|
+
result.success = @handler.scan(args.spec)
|
560
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
561
|
+
result.e = e
|
562
|
+
end
|
563
|
+
write_result(result, oprot, 'scan', seqid)
|
564
|
+
end
|
565
|
+
|
566
|
+
def process_scan_rslt_on_column(seqid, iprot, oprot)
|
567
|
+
args = read_args(iprot, Scan_rslt_on_column_args)
|
568
|
+
result = Scan_rslt_on_column_result.new()
|
569
|
+
begin
|
570
|
+
result.success = @handler.scan_rslt_on_column(args.spec)
|
571
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
572
|
+
result.e = e
|
573
|
+
end
|
574
|
+
write_result(result, oprot, 'scan_rslt_on_column', seqid)
|
575
|
+
end
|
576
|
+
|
577
|
+
def process_scan_rslt_on_key(seqid, iprot, oprot)
|
578
|
+
args = read_args(iprot, Scan_rslt_on_key_args)
|
579
|
+
result = Scan_rslt_on_key_result.new()
|
580
|
+
begin
|
581
|
+
result.success = @handler.scan_rslt_on_key(args.spec)
|
582
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
583
|
+
result.e = e
|
584
|
+
end
|
585
|
+
write_result(result, oprot, 'scan_rslt_on_key', seqid)
|
586
|
+
end
|
587
|
+
|
588
|
+
def process_scan_rslt_on_fraction(seqid, iprot, oprot)
|
589
|
+
args = read_args(iprot, Scan_rslt_on_fraction_args)
|
590
|
+
result = Scan_rslt_on_fraction_result.new()
|
591
|
+
begin
|
592
|
+
result.success = @handler.scan_rslt_on_fraction(args.spec)
|
593
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
594
|
+
result.e = e
|
595
|
+
end
|
596
|
+
write_result(result, oprot, 'scan_rslt_on_fraction', seqid)
|
597
|
+
end
|
598
|
+
|
599
|
+
def process_scan_rslt_on(seqid, iprot, oprot)
|
600
|
+
args = read_args(iprot, Scan_rslt_on_args)
|
601
|
+
result = Scan_rslt_on_result.new()
|
602
|
+
begin
|
603
|
+
result.success = @handler.scan_rslt_on(args.spec, args.rslt)
|
604
|
+
rescue ::Swcdb::Thrift::Gen::Exception => e
|
605
|
+
result.e = e
|
606
|
+
end
|
607
|
+
write_result(result, oprot, 'scan_rslt_on', seqid)
|
608
|
+
end
|
609
|
+
|
610
|
+
end
|
611
|
+
|
612
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
613
|
+
|
614
|
+
class Sql_mng_column_args
|
615
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
616
|
+
SQL = 1
|
617
|
+
|
618
|
+
FIELDS = {
|
619
|
+
# The SQL string to Execute
|
620
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
621
|
+
}
|
622
|
+
|
623
|
+
def struct_fields; FIELDS; end
|
624
|
+
|
625
|
+
def validate
|
626
|
+
end
|
627
|
+
|
628
|
+
::Thrift::Struct.generate_accessors self
|
629
|
+
end
|
630
|
+
|
631
|
+
class Sql_mng_column_result
|
632
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
633
|
+
E = 1
|
634
|
+
|
635
|
+
FIELDS = {
|
636
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
637
|
+
}
|
638
|
+
|
639
|
+
def struct_fields; FIELDS; end
|
640
|
+
|
641
|
+
def validate
|
642
|
+
end
|
643
|
+
|
644
|
+
::Thrift::Struct.generate_accessors self
|
645
|
+
end
|
646
|
+
|
647
|
+
class Sql_list_columns_args
|
648
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
649
|
+
SQL = 1
|
650
|
+
|
651
|
+
FIELDS = {
|
652
|
+
# The SQL string to Execute
|
653
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
654
|
+
}
|
655
|
+
|
656
|
+
def struct_fields; FIELDS; end
|
657
|
+
|
658
|
+
def validate
|
659
|
+
end
|
660
|
+
|
661
|
+
::Thrift::Struct.generate_accessors self
|
662
|
+
end
|
663
|
+
|
664
|
+
class Sql_list_columns_result
|
665
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
666
|
+
SUCCESS = 0
|
667
|
+
E = 1
|
668
|
+
|
669
|
+
FIELDS = {
|
670
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::Schema}},
|
671
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
672
|
+
}
|
673
|
+
|
674
|
+
def struct_fields; FIELDS; end
|
675
|
+
|
676
|
+
def validate
|
677
|
+
end
|
678
|
+
|
679
|
+
::Thrift::Struct.generate_accessors self
|
680
|
+
end
|
681
|
+
|
682
|
+
class Sql_compact_columns_args
|
683
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
684
|
+
SQL = 1
|
685
|
+
|
686
|
+
FIELDS = {
|
687
|
+
# The SQL string to Execute
|
688
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
689
|
+
}
|
690
|
+
|
691
|
+
def struct_fields; FIELDS; end
|
692
|
+
|
693
|
+
def validate
|
694
|
+
end
|
695
|
+
|
696
|
+
::Thrift::Struct.generate_accessors self
|
697
|
+
end
|
698
|
+
|
699
|
+
class Sql_compact_columns_result
|
700
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
701
|
+
SUCCESS = 0
|
702
|
+
E = 1
|
703
|
+
|
704
|
+
FIELDS = {
|
705
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CompactResult}},
|
706
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
707
|
+
}
|
708
|
+
|
709
|
+
def struct_fields; FIELDS; end
|
710
|
+
|
711
|
+
def validate
|
712
|
+
end
|
713
|
+
|
714
|
+
::Thrift::Struct.generate_accessors self
|
715
|
+
end
|
716
|
+
|
717
|
+
class Sql_select_args
|
718
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
719
|
+
SQL = 1
|
720
|
+
|
721
|
+
FIELDS = {
|
722
|
+
# The SQL string to Execute
|
723
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
724
|
+
}
|
725
|
+
|
726
|
+
def struct_fields; FIELDS; end
|
727
|
+
|
728
|
+
def validate
|
729
|
+
end
|
730
|
+
|
731
|
+
::Thrift::Struct.generate_accessors self
|
732
|
+
end
|
733
|
+
|
734
|
+
class Sql_select_result
|
735
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
736
|
+
SUCCESS = 0
|
737
|
+
E = 1
|
738
|
+
|
739
|
+
FIELDS = {
|
740
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::Cells},
|
741
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
742
|
+
}
|
743
|
+
|
744
|
+
def struct_fields; FIELDS; end
|
745
|
+
|
746
|
+
def validate
|
747
|
+
end
|
748
|
+
|
749
|
+
::Thrift::Struct.generate_accessors self
|
750
|
+
end
|
751
|
+
|
752
|
+
class Sql_select_rslt_on_column_args
|
753
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
754
|
+
SQL = 1
|
755
|
+
|
756
|
+
FIELDS = {
|
757
|
+
# The SQL string to Execute
|
758
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
759
|
+
}
|
760
|
+
|
761
|
+
def struct_fields; FIELDS; end
|
762
|
+
|
763
|
+
def validate
|
764
|
+
end
|
765
|
+
|
766
|
+
::Thrift::Struct.generate_accessors self
|
767
|
+
end
|
768
|
+
|
769
|
+
class Sql_select_rslt_on_column_result
|
770
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
771
|
+
SUCCESS = 0
|
772
|
+
E = 1
|
773
|
+
|
774
|
+
FIELDS = {
|
775
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::ColCells}},
|
776
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
777
|
+
}
|
778
|
+
|
779
|
+
def struct_fields; FIELDS; end
|
780
|
+
|
781
|
+
def validate
|
782
|
+
end
|
783
|
+
|
784
|
+
::Thrift::Struct.generate_accessors self
|
785
|
+
end
|
786
|
+
|
787
|
+
class Sql_select_rslt_on_key_args
|
788
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
789
|
+
SQL = 1
|
790
|
+
|
791
|
+
FIELDS = {
|
792
|
+
# The SQL string to Execute
|
793
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
794
|
+
}
|
795
|
+
|
796
|
+
def struct_fields; FIELDS; end
|
797
|
+
|
798
|
+
def validate
|
799
|
+
end
|
800
|
+
|
801
|
+
::Thrift::Struct.generate_accessors self
|
802
|
+
end
|
803
|
+
|
804
|
+
class Sql_select_rslt_on_key_result
|
805
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
806
|
+
SUCCESS = 0
|
807
|
+
E = 1
|
808
|
+
|
809
|
+
FIELDS = {
|
810
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::KCells}},
|
811
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
812
|
+
}
|
813
|
+
|
814
|
+
def struct_fields; FIELDS; end
|
815
|
+
|
816
|
+
def validate
|
817
|
+
end
|
818
|
+
|
819
|
+
::Thrift::Struct.generate_accessors self
|
820
|
+
end
|
821
|
+
|
822
|
+
class Sql_select_rslt_on_fraction_args
|
823
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
824
|
+
SQL = 1
|
825
|
+
|
826
|
+
FIELDS = {
|
827
|
+
# The SQL string to Execute
|
828
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
829
|
+
}
|
830
|
+
|
831
|
+
def struct_fields; FIELDS; end
|
832
|
+
|
833
|
+
def validate
|
834
|
+
end
|
835
|
+
|
836
|
+
::Thrift::Struct.generate_accessors self
|
837
|
+
end
|
838
|
+
|
839
|
+
class Sql_select_rslt_on_fraction_result
|
840
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
841
|
+
SUCCESS = 0
|
842
|
+
E = 1
|
843
|
+
|
844
|
+
FIELDS = {
|
845
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::FCells},
|
846
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
847
|
+
}
|
848
|
+
|
849
|
+
def struct_fields; FIELDS; end
|
850
|
+
|
851
|
+
def validate
|
852
|
+
end
|
853
|
+
|
854
|
+
::Thrift::Struct.generate_accessors self
|
855
|
+
end
|
856
|
+
|
857
|
+
class Sql_query_args
|
858
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
859
|
+
SQL = 1
|
860
|
+
RSLT = 2
|
861
|
+
|
862
|
+
FIELDS = {
|
863
|
+
# The SQL string to Execute
|
864
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'},
|
865
|
+
# The Type of Cells Result for the response
|
866
|
+
RSLT => {:type => ::Thrift::Types::I32, :name => 'rslt', :enum_class => ::Swcdb::Thrift::Gen::CellsResult}
|
867
|
+
}
|
868
|
+
|
869
|
+
def struct_fields; FIELDS; end
|
870
|
+
|
871
|
+
def validate
|
872
|
+
unless @rslt.nil? || ::Swcdb::Thrift::Gen::CellsResult::VALID_VALUES.include?(@rslt)
|
873
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field rslt!')
|
874
|
+
end
|
875
|
+
end
|
876
|
+
|
877
|
+
::Thrift::Struct.generate_accessors self
|
878
|
+
end
|
879
|
+
|
880
|
+
class Sql_query_result
|
881
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
882
|
+
SUCCESS = 0
|
883
|
+
E = 1
|
884
|
+
|
885
|
+
FIELDS = {
|
886
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::CellsGroup},
|
887
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
888
|
+
}
|
889
|
+
|
890
|
+
def struct_fields; FIELDS; end
|
891
|
+
|
892
|
+
def validate
|
893
|
+
end
|
894
|
+
|
895
|
+
::Thrift::Struct.generate_accessors self
|
896
|
+
end
|
897
|
+
|
898
|
+
class Sql_update_args
|
899
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
900
|
+
SQL = 1
|
901
|
+
UPDATER_ID = 2
|
902
|
+
|
903
|
+
FIELDS = {
|
904
|
+
# The SQL string to Execute
|
905
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'},
|
906
|
+
# The Updater ID to work with
|
907
|
+
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
908
|
+
}
|
909
|
+
|
910
|
+
def struct_fields; FIELDS; end
|
911
|
+
|
912
|
+
def validate
|
913
|
+
end
|
914
|
+
|
915
|
+
::Thrift::Struct.generate_accessors self
|
916
|
+
end
|
917
|
+
|
918
|
+
class Sql_update_result
|
919
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
920
|
+
E = 1
|
921
|
+
|
922
|
+
FIELDS = {
|
923
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
924
|
+
}
|
925
|
+
|
926
|
+
def struct_fields; FIELDS; end
|
927
|
+
|
928
|
+
def validate
|
929
|
+
end
|
930
|
+
|
931
|
+
::Thrift::Struct.generate_accessors self
|
932
|
+
end
|
933
|
+
|
934
|
+
class Exec_sql_args
|
935
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
936
|
+
SQL = 1
|
937
|
+
|
938
|
+
FIELDS = {
|
939
|
+
# The SQL string to Execute
|
940
|
+
SQL => {:type => ::Thrift::Types::STRING, :name => 'sql'}
|
941
|
+
}
|
942
|
+
|
943
|
+
def struct_fields; FIELDS; end
|
944
|
+
|
945
|
+
def validate
|
946
|
+
end
|
947
|
+
|
948
|
+
::Thrift::Struct.generate_accessors self
|
949
|
+
end
|
950
|
+
|
951
|
+
class Exec_sql_result
|
952
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
953
|
+
SUCCESS = 0
|
954
|
+
E = 1
|
955
|
+
|
956
|
+
FIELDS = {
|
957
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::Result},
|
958
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
959
|
+
}
|
960
|
+
|
961
|
+
def struct_fields; FIELDS; end
|
962
|
+
|
963
|
+
def validate
|
964
|
+
end
|
965
|
+
|
966
|
+
::Thrift::Struct.generate_accessors self
|
967
|
+
end
|
968
|
+
|
969
|
+
class Updater_create_args
|
970
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
971
|
+
BUFFER_SIZE = 1
|
972
|
+
|
973
|
+
FIELDS = {
|
974
|
+
# The buffer size of the Updater
|
975
|
+
BUFFER_SIZE => {:type => ::Thrift::Types::I32, :name => 'buffer_size'}
|
976
|
+
}
|
977
|
+
|
978
|
+
def struct_fields; FIELDS; end
|
979
|
+
|
980
|
+
def validate
|
981
|
+
end
|
982
|
+
|
983
|
+
::Thrift::Struct.generate_accessors self
|
984
|
+
end
|
985
|
+
|
986
|
+
class Updater_create_result
|
987
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
988
|
+
SUCCESS = 0
|
989
|
+
E = 1
|
990
|
+
|
991
|
+
FIELDS = {
|
992
|
+
SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'},
|
993
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
994
|
+
}
|
995
|
+
|
996
|
+
def struct_fields; FIELDS; end
|
997
|
+
|
998
|
+
def validate
|
999
|
+
end
|
1000
|
+
|
1001
|
+
::Thrift::Struct.generate_accessors self
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
class Updater_close_args
|
1005
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1006
|
+
ID = 1
|
1007
|
+
|
1008
|
+
FIELDS = {
|
1009
|
+
# The Updater ID to close
|
1010
|
+
ID => {:type => ::Thrift::Types::I64, :name => 'id'}
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
def struct_fields; FIELDS; end
|
1014
|
+
|
1015
|
+
def validate
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
::Thrift::Struct.generate_accessors self
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
class Updater_close_result
|
1022
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1023
|
+
E = 1
|
1024
|
+
|
1025
|
+
FIELDS = {
|
1026
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
def struct_fields; FIELDS; end
|
1030
|
+
|
1031
|
+
def validate
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
::Thrift::Struct.generate_accessors self
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
class Update_args
|
1038
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1039
|
+
CELLS = 1
|
1040
|
+
UPDATER_ID = 2
|
1041
|
+
|
1042
|
+
FIELDS = {
|
1043
|
+
# 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}}},
|
1045
|
+
# The Updater ID to use for write
|
1046
|
+
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
def struct_fields; FIELDS; end
|
1050
|
+
|
1051
|
+
def validate
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
::Thrift::Struct.generate_accessors self
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
class Update_result
|
1058
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1059
|
+
E = 1
|
1060
|
+
|
1061
|
+
FIELDS = {
|
1062
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
def struct_fields; FIELDS; end
|
1066
|
+
|
1067
|
+
def validate
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
::Thrift::Struct.generate_accessors self
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
class Update_serial_args
|
1074
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1075
|
+
CELLS = 1
|
1076
|
+
UPDATER_ID = 2
|
1077
|
+
|
1078
|
+
FIELDS = {
|
1079
|
+
# The Serial Cells to update
|
1080
|
+
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::UCellSerial}}},
|
1081
|
+
# The Updater ID to use for write
|
1082
|
+
UPDATER_ID => {:type => ::Thrift::Types::I64, :name => 'updater_id', :default => 0}
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
def struct_fields; FIELDS; end
|
1086
|
+
|
1087
|
+
def validate
|
1088
|
+
end
|
1089
|
+
|
1090
|
+
::Thrift::Struct.generate_accessors self
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
class Update_serial_result
|
1094
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1095
|
+
E = 1
|
1096
|
+
|
1097
|
+
FIELDS = {
|
1098
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
def struct_fields; FIELDS; end
|
1102
|
+
|
1103
|
+
def validate
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
::Thrift::Struct.generate_accessors self
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
class Mng_column_args
|
1110
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1111
|
+
FUNC = 1
|
1112
|
+
SCHEMA = 2
|
1113
|
+
|
1114
|
+
FIELDS = {
|
1115
|
+
# The Action Function to use
|
1116
|
+
FUNC => {:type => ::Thrift::Types::I32, :name => 'func', :enum_class => ::Swcdb::Thrift::Gen::SchemaFunc},
|
1117
|
+
# The Schema for the Action
|
1118
|
+
SCHEMA => {:type => ::Thrift::Types::STRUCT, :name => 'schema', :class => ::Swcdb::Thrift::Gen::Schema}
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
def struct_fields; FIELDS; end
|
1122
|
+
|
1123
|
+
def validate
|
1124
|
+
unless @func.nil? || ::Swcdb::Thrift::Gen::SchemaFunc::VALID_VALUES.include?(@func)
|
1125
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field func!')
|
1126
|
+
end
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
::Thrift::Struct.generate_accessors self
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
class Mng_column_result
|
1133
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1134
|
+
E = 1
|
1135
|
+
|
1136
|
+
FIELDS = {
|
1137
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
def struct_fields; FIELDS; end
|
1141
|
+
|
1142
|
+
def validate
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
::Thrift::Struct.generate_accessors self
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
class List_columns_args
|
1149
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1150
|
+
SPEC = 1
|
1151
|
+
|
1152
|
+
FIELDS = {
|
1153
|
+
# The Schemas Specifications to match Schema for response
|
1154
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecSchemas}
|
1155
|
+
}
|
1156
|
+
|
1157
|
+
def struct_fields; FIELDS; end
|
1158
|
+
|
1159
|
+
def validate
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
::Thrift::Struct.generate_accessors self
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
class List_columns_result
|
1166
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1167
|
+
SUCCESS = 0
|
1168
|
+
E = 1
|
1169
|
+
|
1170
|
+
FIELDS = {
|
1171
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::Schema}},
|
1172
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
def struct_fields; FIELDS; end
|
1176
|
+
|
1177
|
+
def validate
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
::Thrift::Struct.generate_accessors self
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
class Compact_columns_args
|
1184
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1185
|
+
SPEC = 1
|
1186
|
+
|
1187
|
+
FIELDS = {
|
1188
|
+
# The Schemas Specifications to match columns to Compact
|
1189
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecSchemas}
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
def struct_fields; FIELDS; end
|
1193
|
+
|
1194
|
+
def validate
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
::Thrift::Struct.generate_accessors self
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
class Compact_columns_result
|
1201
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1202
|
+
SUCCESS = 0
|
1203
|
+
E = 1
|
1204
|
+
|
1205
|
+
FIELDS = {
|
1206
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::CompactResult}},
|
1207
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
def struct_fields; FIELDS; end
|
1211
|
+
|
1212
|
+
def validate
|
1213
|
+
end
|
1214
|
+
|
1215
|
+
::Thrift::Struct.generate_accessors self
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
class Scan_args
|
1219
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1220
|
+
SPEC = 1
|
1221
|
+
|
1222
|
+
FIELDS = {
|
1223
|
+
# The Scan Specifications for the scan
|
1224
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecScan}
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
def struct_fields; FIELDS; end
|
1228
|
+
|
1229
|
+
def validate
|
1230
|
+
end
|
1231
|
+
|
1232
|
+
::Thrift::Struct.generate_accessors self
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
class Scan_result
|
1236
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1237
|
+
SUCCESS = 0
|
1238
|
+
E = 1
|
1239
|
+
|
1240
|
+
FIELDS = {
|
1241
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::Cells},
|
1242
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
def struct_fields; FIELDS; end
|
1246
|
+
|
1247
|
+
def validate
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
::Thrift::Struct.generate_accessors self
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
class Scan_rslt_on_column_args
|
1254
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1255
|
+
SPEC = 1
|
1256
|
+
|
1257
|
+
FIELDS = {
|
1258
|
+
# The Scan Specifications for the scan
|
1259
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecScan}
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
def struct_fields; FIELDS; end
|
1263
|
+
|
1264
|
+
def validate
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
::Thrift::Struct.generate_accessors self
|
1268
|
+
end
|
1269
|
+
|
1270
|
+
class Scan_rslt_on_column_result
|
1271
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1272
|
+
SUCCESS = 0
|
1273
|
+
E = 1
|
1274
|
+
|
1275
|
+
FIELDS = {
|
1276
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::ColCells}},
|
1277
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
def struct_fields; FIELDS; end
|
1281
|
+
|
1282
|
+
def validate
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
::Thrift::Struct.generate_accessors self
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
class Scan_rslt_on_key_args
|
1289
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1290
|
+
SPEC = 1
|
1291
|
+
|
1292
|
+
FIELDS = {
|
1293
|
+
# The Scan Specifications for the scan
|
1294
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecScan}
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
def struct_fields; FIELDS; end
|
1298
|
+
|
1299
|
+
def validate
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
::Thrift::Struct.generate_accessors self
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
class Scan_rslt_on_key_result
|
1306
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1307
|
+
SUCCESS = 0
|
1308
|
+
E = 1
|
1309
|
+
|
1310
|
+
FIELDS = {
|
1311
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Swcdb::Thrift::Gen::KCells}},
|
1312
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1313
|
+
}
|
1314
|
+
|
1315
|
+
def struct_fields; FIELDS; end
|
1316
|
+
|
1317
|
+
def validate
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
::Thrift::Struct.generate_accessors self
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
class Scan_rslt_on_fraction_args
|
1324
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1325
|
+
SPEC = 1
|
1326
|
+
|
1327
|
+
FIELDS = {
|
1328
|
+
# The Scan Specifications for the scan
|
1329
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecScan}
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
def struct_fields; FIELDS; end
|
1333
|
+
|
1334
|
+
def validate
|
1335
|
+
end
|
1336
|
+
|
1337
|
+
::Thrift::Struct.generate_accessors self
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
class Scan_rslt_on_fraction_result
|
1341
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1342
|
+
SUCCESS = 0
|
1343
|
+
E = 1
|
1344
|
+
|
1345
|
+
FIELDS = {
|
1346
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::FCells},
|
1347
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
def struct_fields; FIELDS; end
|
1351
|
+
|
1352
|
+
def validate
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
::Thrift::Struct.generate_accessors self
|
1356
|
+
end
|
1357
|
+
|
1358
|
+
class Scan_rslt_on_args
|
1359
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1360
|
+
SPEC = 1
|
1361
|
+
RSLT = 2
|
1362
|
+
|
1363
|
+
FIELDS = {
|
1364
|
+
# The Scan Specifications for the scan
|
1365
|
+
SPEC => {:type => ::Thrift::Types::STRUCT, :name => 'spec', :class => ::Swcdb::Thrift::Gen::SpecScan},
|
1366
|
+
# The Type of Cells Result for the response
|
1367
|
+
RSLT => {:type => ::Thrift::Types::I32, :name => 'rslt', :enum_class => ::Swcdb::Thrift::Gen::CellsResult}
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
def struct_fields; FIELDS; end
|
1371
|
+
|
1372
|
+
def validate
|
1373
|
+
unless @rslt.nil? || ::Swcdb::Thrift::Gen::CellsResult::VALID_VALUES.include?(@rslt)
|
1374
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field rslt!')
|
1375
|
+
end
|
1376
|
+
end
|
1377
|
+
|
1378
|
+
::Thrift::Struct.generate_accessors self
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
class Scan_rslt_on_result
|
1382
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1383
|
+
SUCCESS = 0
|
1384
|
+
E = 1
|
1385
|
+
|
1386
|
+
FIELDS = {
|
1387
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Swcdb::Thrift::Gen::CellsGroup},
|
1388
|
+
# The Base Exception
|
1389
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Swcdb::Thrift::Gen::Exception}
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
def struct_fields; FIELDS; end
|
1393
|
+
|
1394
|
+
def validate
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
::Thrift::Struct.generate_accessors self
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
end
|
1403
|
+
end
|
1404
|
+
end
|