tempest_db 0.13.2 → 0.14.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
  SHA1:
3
- metadata.gz: bd0251246d8e34f45d4a9a642a5c0437787969eb
4
- data.tar.gz: 82770a53fbac19c30faf7608011199b9b353e4c8
3
+ metadata.gz: fbdd9bc75997cf1d354f553f0c13e4ed2a066872
4
+ data.tar.gz: a3f5a5d9c1cffff876d79da918790c7cbc568129
5
5
  SHA512:
6
- metadata.gz: e6b6e00c7e9165ed2200a9a7edcf08b9b97f0c07f6988f39403c59214ad455b49e452247926e60b737eeb65543e7dd3a9d4fc2fd7f7a268d47cece4988f19bcf
7
- data.tar.gz: 8b3887040d8ec3ebe1c5120584e6f31e03ec0bf7c2a27ece714b88160562054a99dea22d83869fa732d46c32807ec39a7c56cf97a3debbe11429326a1d8773c1
6
+ metadata.gz: 21995f638660218660e0c3054705e514b77b7733676c023c2e2fc5a3b33b1a2d63d12db9ed42abe4578bc6ea06cc955efea65d5fd3066ebb9ac153a14c6e639c
7
+ data.tar.gz: 7480476805f705c0cb9d9a0d015e019a2d44d10fb1b339411e44c5cddd3de2041c26879221e1d8f8e8030c4c3233d55ae327fad8f2cb18cd7d358b05ccfacc12
@@ -7,3 +7,7 @@
7
7
  require 'thrift'
8
8
  require 'tempest_types'
9
9
 
10
+ module Teapot
11
+ module TempestDB
12
+ end
13
+ end
@@ -5,56 +5,143 @@
5
5
  #
6
6
 
7
7
  require 'thrift'
8
- require 'tempest_graph_service'
9
- require 'tempest_db_types'
8
+ require 'tempest_types'
10
9
 
11
10
  module Teapot
12
11
  module TempestDB
13
12
  module TempestDBService
14
- class Client < ::TempestGraphService::Client
13
+ class Client
15
14
  include ::Thrift::Client
16
15
 
17
- def getMultiNodeAttributeAsJSON(nodeType, nodeIds, attributeName)
18
- send_getMultiNodeAttributeAsJSON(nodeType, nodeIds, attributeName)
19
- return recv_getMultiNodeAttributeAsJSON()
16
+ def outDegree(edgeType, node)
17
+ send_outDegree(edgeType, node)
18
+ return recv_outDegree()
20
19
  end
21
20
 
22
- def send_getMultiNodeAttributeAsJSON(nodeType, nodeIds, attributeName)
23
- send_message('getMultiNodeAttributeAsJSON', GetMultiNodeAttributeAsJSON_args, :nodeType => nodeType, :nodeIds => nodeIds, :attributeName => attributeName)
21
+ def send_outDegree(edgeType, node)
22
+ send_message('outDegree', OutDegree_args, :edgeType => edgeType, :node => node)
24
23
  end
25
24
 
26
- def recv_getMultiNodeAttributeAsJSON()
27
- result = receive_message(GetMultiNodeAttributeAsJSON_result)
25
+ def recv_outDegree()
26
+ result = receive_message(OutDegree_result)
28
27
  return result.success unless result.success.nil?
29
- raise result.error1 unless result.error1.nil?
30
- raise result.error2 unless result.error2.nil?
31
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMultiNodeAttributeAsJSON failed: unknown result')
28
+ raise result.ex1 unless result.ex1.nil?
29
+ raise result.ex2 unless result.ex2.nil?
30
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'outDegree failed: unknown result')
32
31
  end
33
32
 
34
- def nodes(nodeType, sqlClause)
35
- send_nodes(nodeType, sqlClause)
36
- return recv_nodes()
33
+ def inDegree(edgeType, node)
34
+ send_inDegree(edgeType, node)
35
+ return recv_inDegree()
37
36
  end
38
37
 
39
- def send_nodes(nodeType, sqlClause)
40
- send_message('nodes', Nodes_args, :nodeType => nodeType, :sqlClause => sqlClause)
38
+ def send_inDegree(edgeType, node)
39
+ send_message('inDegree', InDegree_args, :edgeType => edgeType, :node => node)
41
40
  end
42
41
 
43
- def recv_nodes()
44
- result = receive_message(Nodes_result)
42
+ def recv_inDegree()
43
+ result = receive_message(InDegree_result)
44
+ return result.success unless result.success.nil?
45
+ raise result.ex1 unless result.ex1.nil?
46
+ raise result.ex2 unless result.ex2.nil?
47
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'inDegree failed: unknown result')
48
+ end
49
+
50
+ def outNeighbors(edgeType, node)
51
+ send_outNeighbors(edgeType, node)
52
+ return recv_outNeighbors()
53
+ end
54
+
55
+ def send_outNeighbors(edgeType, node)
56
+ send_message('outNeighbors', OutNeighbors_args, :edgeType => edgeType, :node => node)
57
+ end
58
+
59
+ def recv_outNeighbors()
60
+ result = receive_message(OutNeighbors_result)
61
+ return result.success unless result.success.nil?
62
+ raise result.ex1 unless result.ex1.nil?
63
+ raise result.ex2 unless result.ex2.nil?
64
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'outNeighbors failed: unknown result')
65
+ end
66
+
67
+ def inNeighbors(edgeType, node)
68
+ send_inNeighbors(edgeType, node)
69
+ return recv_inNeighbors()
70
+ end
71
+
72
+ def send_inNeighbors(edgeType, node)
73
+ send_message('inNeighbors', InNeighbors_args, :edgeType => edgeType, :node => node)
74
+ end
75
+
76
+ def recv_inNeighbors()
77
+ result = receive_message(InNeighbors_result)
78
+ return result.success unless result.success.nil?
79
+ raise result.ex1 unless result.ex1.nil?
80
+ raise result.ex2 unless result.ex2.nil?
81
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'inNeighbors failed: unknown result')
82
+ end
83
+
84
+ def outNeighbor(edgeType, node, i)
85
+ send_outNeighbor(edgeType, node, i)
86
+ return recv_outNeighbor()
87
+ end
88
+
89
+ def send_outNeighbor(edgeType, node, i)
90
+ send_message('outNeighbor', OutNeighbor_args, :edgeType => edgeType, :node => node, :i => i)
91
+ end
92
+
93
+ def recv_outNeighbor()
94
+ result = receive_message(OutNeighbor_result)
95
+ return result.success unless result.success.nil?
96
+ raise result.ex1 unless result.ex1.nil?
97
+ raise result.ex2 unless result.ex2.nil?
98
+ raise result.ex3 unless result.ex3.nil?
99
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'outNeighbor failed: unknown result')
100
+ end
101
+
102
+ def inNeighbor(edgeType, node, i)
103
+ send_inNeighbor(edgeType, node, i)
104
+ return recv_inNeighbor()
105
+ end
106
+
107
+ def send_inNeighbor(edgeType, node, i)
108
+ send_message('inNeighbor', InNeighbor_args, :edgeType => edgeType, :node => node, :i => i)
109
+ end
110
+
111
+ def recv_inNeighbor()
112
+ result = receive_message(InNeighbor_result)
113
+ return result.success unless result.success.nil?
114
+ raise result.ex1 unless result.ex1.nil?
115
+ raise result.ex2 unless result.ex2.nil?
116
+ raise result.ex3 unless result.ex3.nil?
117
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'inNeighbor failed: unknown result')
118
+ end
119
+
120
+ def connectedComponent(source, edgeTypes, maxSize)
121
+ send_connectedComponent(source, edgeTypes, maxSize)
122
+ return recv_connectedComponent()
123
+ end
124
+
125
+ def send_connectedComponent(source, edgeTypes, maxSize)
126
+ send_message('connectedComponent', ConnectedComponent_args, :source => source, :edgeTypes => edgeTypes, :maxSize => maxSize)
127
+ end
128
+
129
+ def recv_connectedComponent()
130
+ result = receive_message(ConnectedComponent_result)
45
131
  return result.success unless result.success.nil?
46
132
  raise result.error1 unless result.error1.nil?
47
133
  raise result.error2 unless result.error2.nil?
48
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'nodes failed: unknown result')
134
+ raise result.error3 unless result.error3.nil?
135
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'connectedComponent failed: unknown result')
49
136
  end
50
137
 
51
- def kStepOutNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
52
- send_kStepOutNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
138
+ def kStepOutNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
139
+ send_kStepOutNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
53
140
  return recv_kStepOutNeighborsFiltered()
54
141
  end
55
142
 
56
- def send_kStepOutNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
57
- send_message('kStepOutNeighborsFiltered', KStepOutNeighborsFiltered_args, :edgeType => edgeType, :sourceId => sourceId, :k => k, :sqlClause => sqlClause, :filter => filter, :alternating => alternating)
143
+ def send_kStepOutNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
144
+ send_message('kStepOutNeighborsFiltered', KStepOutNeighborsFiltered_args, :edgeType => edgeType, :source => source, :k => k, :sqlClause => sqlClause, :filter => filter, :alternating => alternating)
58
145
  end
59
146
 
60
147
  def recv_kStepOutNeighborsFiltered()
@@ -67,13 +154,13 @@ module Teapot
67
154
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'kStepOutNeighborsFiltered failed: unknown result')
68
155
  end
69
156
 
70
- def kStepInNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
71
- send_kStepInNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
157
+ def kStepInNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
158
+ send_kStepInNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
72
159
  return recv_kStepInNeighborsFiltered()
73
160
  end
74
161
 
75
- def send_kStepInNeighborsFiltered(edgeType, sourceId, k, sqlClause, filter, alternating)
76
- send_message('kStepInNeighborsFiltered', KStepInNeighborsFiltered_args, :edgeType => edgeType, :sourceId => sourceId, :k => k, :sqlClause => sqlClause, :filter => filter, :alternating => alternating)
162
+ def send_kStepInNeighborsFiltered(edgeType, source, k, sqlClause, filter, alternating)
163
+ send_message('kStepInNeighborsFiltered', KStepInNeighborsFiltered_args, :edgeType => edgeType, :source => source, :k => k, :sqlClause => sqlClause, :filter => filter, :alternating => alternating)
77
164
  end
78
165
 
79
166
  def recv_kStepInNeighborsFiltered()
@@ -86,31 +173,148 @@ module Teapot
86
173
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'kStepInNeighborsFiltered failed: unknown result')
87
174
  end
88
175
 
89
- def ppr(edgeType, seeds, seedType, targetType, pageRankParams)
90
- send_ppr(edgeType, seeds, seedType, targetType, pageRankParams)
91
- return recv_ppr()
176
+ def pprUndirected(edgeTypes, seeds, pageRankParams)
177
+ send_pprUndirected(edgeTypes, seeds, pageRankParams)
178
+ return recv_pprUndirected()
179
+ end
180
+
181
+ def send_pprUndirected(edgeTypes, seeds, pageRankParams)
182
+ send_message('pprUndirected', PprUndirected_args, :edgeTypes => edgeTypes, :seeds => seeds, :pageRankParams => pageRankParams)
183
+ end
184
+
185
+ def recv_pprUndirected()
186
+ result = receive_message(PprUndirected_result)
187
+ return result.success unless result.success.nil?
188
+ raise result.error1 unless result.error1.nil?
189
+ raise result.error2 unless result.error2.nil?
190
+ raise result.error3 unless result.error3.nil?
191
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'pprUndirected failed: unknown result')
192
+ end
193
+
194
+ def pprSingleTarget(edgeType, seedNodes, targetNode, biPPRParams)
195
+ send_pprSingleTarget(edgeType, seedNodes, targetNode, biPPRParams)
196
+ return recv_pprSingleTarget()
197
+ end
198
+
199
+ def send_pprSingleTarget(edgeType, seedNodes, targetNode, biPPRParams)
200
+ send_message('pprSingleTarget', PprSingleTarget_args, :edgeType => edgeType, :seedNodes => seedNodes, :targetNode => targetNode, :biPPRParams => biPPRParams)
201
+ end
202
+
203
+ def recv_pprSingleTarget()
204
+ result = receive_message(PprSingleTarget_result)
205
+ return result.success unless result.success.nil?
206
+ raise result.ex1 unless result.ex1.nil?
207
+ raise result.ex2 unless result.ex2.nil?
208
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'pprSingleTarget failed: unknown result')
209
+ end
210
+
211
+ def nodeCount(edgeType)
212
+ send_nodeCount(edgeType)
213
+ return recv_nodeCount()
214
+ end
215
+
216
+ def send_nodeCount(edgeType)
217
+ send_message('nodeCount', NodeCount_args, :edgeType => edgeType)
218
+ end
219
+
220
+ def recv_nodeCount()
221
+ result = receive_message(NodeCount_result)
222
+ return result.success unless result.success.nil?
223
+ raise result.ex unless result.ex.nil?
224
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'nodeCount failed: unknown result')
225
+ end
226
+
227
+ def edgeCount(edgeType)
228
+ send_edgeCount(edgeType)
229
+ return recv_edgeCount()
230
+ end
231
+
232
+ def send_edgeCount(edgeType)
233
+ send_message('edgeCount', EdgeCount_args, :edgeType => edgeType)
234
+ end
235
+
236
+ def recv_edgeCount()
237
+ result = receive_message(EdgeCount_result)
238
+ return result.success unless result.success.nil?
239
+ raise result.ex unless result.ex.nil?
240
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'edgeCount failed: unknown result')
241
+ end
242
+
243
+ def nodes(nodeType, sqlClause)
244
+ send_nodes(nodeType, sqlClause)
245
+ return recv_nodes()
246
+ end
247
+
248
+ def send_nodes(nodeType, sqlClause)
249
+ send_message('nodes', Nodes_args, :nodeType => nodeType, :sqlClause => sqlClause)
250
+ end
251
+
252
+ def recv_nodes()
253
+ result = receive_message(Nodes_result)
254
+ return result.success unless result.success.nil?
255
+ raise result.error1 unless result.error1.nil?
256
+ raise result.error2 unless result.error2.nil?
257
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'nodes failed: unknown result')
92
258
  end
93
259
 
94
- def send_ppr(edgeType, seeds, seedType, targetType, pageRankParams)
95
- send_message('ppr', Ppr_args, :edgeType => edgeType, :seeds => seeds, :seedType => seedType, :targetType => targetType, :pageRankParams => pageRankParams)
260
+ def getMultiNodeAttributeAsJSON(nodes, attributeName)
261
+ send_getMultiNodeAttributeAsJSON(nodes, attributeName)
262
+ return recv_getMultiNodeAttributeAsJSON()
263
+ end
264
+
265
+ def send_getMultiNodeAttributeAsJSON(nodes, attributeName)
266
+ send_message('getMultiNodeAttributeAsJSON', GetMultiNodeAttributeAsJSON_args, :nodes => nodes, :attributeName => attributeName)
96
267
  end
97
268
 
98
- def recv_ppr()
99
- result = receive_message(Ppr_result)
269
+ def recv_getMultiNodeAttributeAsJSON()
270
+ result = receive_message(GetMultiNodeAttributeAsJSON_result)
100
271
  return result.success unless result.success.nil?
101
272
  raise result.error1 unless result.error1.nil?
102
273
  raise result.error2 unless result.error2.nil?
274
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMultiNodeAttributeAsJSON failed: unknown result')
275
+ end
276
+
277
+ def addNode(node)
278
+ send_addNode(node)
279
+ recv_addNode()
280
+ end
281
+
282
+ def send_addNode(node)
283
+ send_message('addNode', AddNode_args, :node => node)
284
+ end
285
+
286
+ def recv_addNode()
287
+ result = receive_message(AddNode_result)
288
+ raise result.error1 unless result.error1.nil?
289
+ raise result.error2 unless result.error2.nil?
290
+ raise result.error3 unless result.error3.nil?
291
+ return
292
+ end
293
+
294
+ def setNodeAttribute(node, attributeName, attributeValue)
295
+ send_setNodeAttribute(node, attributeName, attributeValue)
296
+ recv_setNodeAttribute()
297
+ end
298
+
299
+ def send_setNodeAttribute(node, attributeName, attributeValue)
300
+ send_message('setNodeAttribute', SetNodeAttribute_args, :node => node, :attributeName => attributeName, :attributeValue => attributeValue)
301
+ end
302
+
303
+ def recv_setNodeAttribute()
304
+ result = receive_message(SetNodeAttribute_result)
305
+ raise result.error1 unless result.error1.nil?
306
+ raise result.error2 unless result.error2.nil?
103
307
  raise result.error3 unless result.error3.nil?
104
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ppr failed: unknown result')
308
+ return
105
309
  end
106
310
 
107
- def addEdges(edgeType, ids1, ids2)
108
- send_addEdges(edgeType, ids1, ids2)
311
+ def addEdges(edgeType, sourceNodes, targetNodes)
312
+ send_addEdges(edgeType, sourceNodes, targetNodes)
109
313
  recv_addEdges()
110
314
  end
111
315
 
112
- def send_addEdges(edgeType, ids1, ids2)
113
- send_message('addEdges', AddEdges_args, :edgeType => edgeType, :ids1 => ids1, :ids2 => ids2)
316
+ def send_addEdges(edgeType, sourceNodes, targetNodes)
317
+ send_message('addEdges', AddEdges_args, :edgeType => edgeType, :sourceNodes => sourceNodes, :targetNodes => targetNodes)
114
318
  end
115
319
 
116
320
  def recv_addEdges()
@@ -122,47 +326,118 @@ module Teapot
122
326
 
123
327
  end
124
328
 
125
- class Processor < ::TempestGraphService::Processor
329
+ class Processor
126
330
  include ::Thrift::Processor
127
331
 
128
- def process_getMultiNodeAttributeAsJSON(seqid, iprot, oprot)
129
- args = read_args(iprot, GetMultiNodeAttributeAsJSON_args)
130
- result = GetMultiNodeAttributeAsJSON_result.new()
332
+ def process_outDegree(seqid, iprot, oprot)
333
+ args = read_args(iprot, OutDegree_args)
334
+ result = OutDegree_result.new()
131
335
  begin
132
- result.success = @handler.getMultiNodeAttributeAsJSON(args.nodeType, args.nodeIds, args.attributeName)
133
- rescue ::Teapot::TempestDB::UndefinedGraphException => error1
134
- result.error1 = error1
135
- rescue ::Teapot::TempestDB::UndefinedAttributeException => error2
136
- result.error2 = error2
336
+ result.success = @handler.outDegree(args.edgeType, args.node)
337
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
338
+ result.ex1 = ex1
339
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex2
340
+ result.ex2 = ex2
137
341
  end
138
- write_result(result, oprot, 'getMultiNodeAttributeAsJSON', seqid)
342
+ write_result(result, oprot, 'outDegree', seqid)
139
343
  end
140
344
 
141
- def process_nodes(seqid, iprot, oprot)
142
- args = read_args(iprot, Nodes_args)
143
- result = Nodes_result.new()
345
+ def process_inDegree(seqid, iprot, oprot)
346
+ args = read_args(iprot, InDegree_args)
347
+ result = InDegree_result.new()
144
348
  begin
145
- result.success = @handler.nodes(args.nodeType, args.sqlClause)
349
+ result.success = @handler.inDegree(args.edgeType, args.node)
350
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
351
+ result.ex1 = ex1
352
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex2
353
+ result.ex2 = ex2
354
+ end
355
+ write_result(result, oprot, 'inDegree', seqid)
356
+ end
357
+
358
+ def process_outNeighbors(seqid, iprot, oprot)
359
+ args = read_args(iprot, OutNeighbors_args)
360
+ result = OutNeighbors_result.new()
361
+ begin
362
+ result.success = @handler.outNeighbors(args.edgeType, args.node)
363
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
364
+ result.ex1 = ex1
365
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex2
366
+ result.ex2 = ex2
367
+ end
368
+ write_result(result, oprot, 'outNeighbors', seqid)
369
+ end
370
+
371
+ def process_inNeighbors(seqid, iprot, oprot)
372
+ args = read_args(iprot, InNeighbors_args)
373
+ result = InNeighbors_result.new()
374
+ begin
375
+ result.success = @handler.inNeighbors(args.edgeType, args.node)
376
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
377
+ result.ex1 = ex1
378
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex2
379
+ result.ex2 = ex2
380
+ end
381
+ write_result(result, oprot, 'inNeighbors', seqid)
382
+ end
383
+
384
+ def process_outNeighbor(seqid, iprot, oprot)
385
+ args = read_args(iprot, OutNeighbor_args)
386
+ result = OutNeighbor_result.new()
387
+ begin
388
+ result.success = @handler.outNeighbor(args.edgeType, args.node, args.i)
389
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
390
+ result.ex1 = ex1
391
+ rescue ::Teapot::TempestDB::InvalidIndexException => ex2
392
+ result.ex2 = ex2
393
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex3
394
+ result.ex3 = ex3
395
+ end
396
+ write_result(result, oprot, 'outNeighbor', seqid)
397
+ end
398
+
399
+ def process_inNeighbor(seqid, iprot, oprot)
400
+ args = read_args(iprot, InNeighbor_args)
401
+ result = InNeighbor_result.new()
402
+ begin
403
+ result.success = @handler.inNeighbor(args.edgeType, args.node, args.i)
404
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
405
+ result.ex1 = ex1
406
+ rescue ::Teapot::TempestDB::InvalidIndexException => ex2
407
+ result.ex2 = ex2
408
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex3
409
+ result.ex3 = ex3
410
+ end
411
+ write_result(result, oprot, 'inNeighbor', seqid)
412
+ end
413
+
414
+ def process_connectedComponent(seqid, iprot, oprot)
415
+ args = read_args(iprot, ConnectedComponent_args)
416
+ result = ConnectedComponent_result.new()
417
+ begin
418
+ result.success = @handler.connectedComponent(args.source, args.edgeTypes, args.maxSize)
146
419
  rescue ::Teapot::TempestDB::UndefinedGraphException => error1
147
420
  result.error1 = error1
148
- rescue ::Teapot::TempestDB::SQLException => error2
421
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => error2
149
422
  result.error2 = error2
423
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error3
424
+ result.error3 = error3
150
425
  end
151
- write_result(result, oprot, 'nodes', seqid)
426
+ write_result(result, oprot, 'connectedComponent', seqid)
152
427
  end
153
428
 
154
429
  def process_kStepOutNeighborsFiltered(seqid, iprot, oprot)
155
430
  args = read_args(iprot, KStepOutNeighborsFiltered_args)
156
431
  result = KStepOutNeighborsFiltered_result.new()
157
432
  begin
158
- result.success = @handler.kStepOutNeighborsFiltered(args.edgeType, args.sourceId, args.k, args.sqlClause, args.filter, args.alternating)
433
+ result.success = @handler.kStepOutNeighborsFiltered(args.edgeType, args.source, args.k, args.sqlClause, args.filter, args.alternating)
159
434
  rescue ::Teapot::TempestDB::UndefinedGraphException => error1
160
435
  result.error1 = error1
161
- rescue ::InvalidArgumentException => error2
436
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error2
162
437
  result.error2 = error2
163
438
  rescue ::Teapot::TempestDB::SQLException => error3
164
439
  result.error3 = error3
165
- rescue ::InvalidNodeIdException => error4
440
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => error4
166
441
  result.error4 = error4
167
442
  end
168
443
  write_result(result, oprot, 'kStepOutNeighborsFiltered', seqid)
@@ -172,39 +447,130 @@ module Teapot
172
447
  args = read_args(iprot, KStepInNeighborsFiltered_args)
173
448
  result = KStepInNeighborsFiltered_result.new()
174
449
  begin
175
- result.success = @handler.kStepInNeighborsFiltered(args.edgeType, args.sourceId, args.k, args.sqlClause, args.filter, args.alternating)
450
+ result.success = @handler.kStepInNeighborsFiltered(args.edgeType, args.source, args.k, args.sqlClause, args.filter, args.alternating)
176
451
  rescue ::Teapot::TempestDB::UndefinedGraphException => error1
177
452
  result.error1 = error1
178
- rescue ::InvalidArgumentException => error2
453
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error2
179
454
  result.error2 = error2
180
455
  rescue ::Teapot::TempestDB::SQLException => error3
181
456
  result.error3 = error3
182
- rescue ::InvalidNodeIdException => error4
457
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => error4
183
458
  result.error4 = error4
184
459
  end
185
460
  write_result(result, oprot, 'kStepInNeighborsFiltered', seqid)
186
461
  end
187
462
 
188
- def process_ppr(seqid, iprot, oprot)
189
- args = read_args(iprot, Ppr_args)
190
- result = Ppr_result.new()
463
+ def process_pprUndirected(seqid, iprot, oprot)
464
+ args = read_args(iprot, PprUndirected_args)
465
+ result = PprUndirected_result.new()
466
+ begin
467
+ result.success = @handler.pprUndirected(args.edgeTypes, args.seeds, args.pageRankParams)
468
+ rescue ::Teapot::TempestDB::UndefinedGraphException => error1
469
+ result.error1 = error1
470
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => error2
471
+ result.error2 = error2
472
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error3
473
+ result.error3 = error3
474
+ end
475
+ write_result(result, oprot, 'pprUndirected', seqid)
476
+ end
477
+
478
+ def process_pprSingleTarget(seqid, iprot, oprot)
479
+ args = read_args(iprot, PprSingleTarget_args)
480
+ result = PprSingleTarget_result.new()
481
+ begin
482
+ result.success = @handler.pprSingleTarget(args.edgeType, args.seedNodes, args.targetNode, args.biPPRParams)
483
+ rescue ::Teapot::TempestDB::InvalidNodeIdException => ex1
484
+ result.ex1 = ex1
485
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex2
486
+ result.ex2 = ex2
487
+ end
488
+ write_result(result, oprot, 'pprSingleTarget', seqid)
489
+ end
490
+
491
+ def process_nodeCount(seqid, iprot, oprot)
492
+ args = read_args(iprot, NodeCount_args)
493
+ result = NodeCount_result.new()
494
+ begin
495
+ result.success = @handler.nodeCount(args.edgeType)
496
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex
497
+ result.ex = ex
498
+ end
499
+ write_result(result, oprot, 'nodeCount', seqid)
500
+ end
501
+
502
+ def process_edgeCount(seqid, iprot, oprot)
503
+ args = read_args(iprot, EdgeCount_args)
504
+ result = EdgeCount_result.new()
505
+ begin
506
+ result.success = @handler.edgeCount(args.edgeType)
507
+ rescue ::Teapot::TempestDB::InvalidArgumentException => ex
508
+ result.ex = ex
509
+ end
510
+ write_result(result, oprot, 'edgeCount', seqid)
511
+ end
512
+
513
+ def process_nodes(seqid, iprot, oprot)
514
+ args = read_args(iprot, Nodes_args)
515
+ result = Nodes_result.new()
516
+ begin
517
+ result.success = @handler.nodes(args.nodeType, args.sqlClause)
518
+ rescue ::Teapot::TempestDB::UndefinedGraphException => error1
519
+ result.error1 = error1
520
+ rescue ::Teapot::TempestDB::SQLException => error2
521
+ result.error2 = error2
522
+ end
523
+ write_result(result, oprot, 'nodes', seqid)
524
+ end
525
+
526
+ def process_getMultiNodeAttributeAsJSON(seqid, iprot, oprot)
527
+ args = read_args(iprot, GetMultiNodeAttributeAsJSON_args)
528
+ result = GetMultiNodeAttributeAsJSON_result.new()
529
+ begin
530
+ result.success = @handler.getMultiNodeAttributeAsJSON(args.nodes, args.attributeName)
531
+ rescue ::Teapot::TempestDB::UndefinedGraphException => error1
532
+ result.error1 = error1
533
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error2
534
+ result.error2 = error2
535
+ end
536
+ write_result(result, oprot, 'getMultiNodeAttributeAsJSON', seqid)
537
+ end
538
+
539
+ def process_addNode(seqid, iprot, oprot)
540
+ args = read_args(iprot, AddNode_args)
541
+ result = AddNode_result.new()
542
+ begin
543
+ @handler.addNode(args.node)
544
+ rescue ::Teapot::TempestDB::UndefinedGraphException => error1
545
+ result.error1 = error1
546
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error2
547
+ result.error2 = error2
548
+ rescue ::Teapot::TempestDB::SQLException => error3
549
+ result.error3 = error3
550
+ end
551
+ write_result(result, oprot, 'addNode', seqid)
552
+ end
553
+
554
+ def process_setNodeAttribute(seqid, iprot, oprot)
555
+ args = read_args(iprot, SetNodeAttribute_args)
556
+ result = SetNodeAttribute_result.new()
191
557
  begin
192
- result.success = @handler.ppr(args.edgeType, args.seeds, args.seedType, args.targetType, args.pageRankParams)
558
+ @handler.setNodeAttribute(args.node, args.attributeName, args.attributeValue)
193
559
  rescue ::Teapot::TempestDB::UndefinedGraphException => error1
194
560
  result.error1 = error1
195
- rescue ::InvalidNodeIdException => error2
561
+ rescue ::Teapot::TempestDB::InvalidArgumentException => error2
196
562
  result.error2 = error2
197
- rescue ::InvalidArgumentException => error3
563
+ rescue ::Teapot::TempestDB::SQLException => error3
198
564
  result.error3 = error3
199
565
  end
200
- write_result(result, oprot, 'ppr', seqid)
566
+ write_result(result, oprot, 'setNodeAttribute', seqid)
201
567
  end
202
568
 
203
569
  def process_addEdges(seqid, iprot, oprot)
204
570
  args = read_args(iprot, AddEdges_args)
205
571
  result = AddEdges_result.new()
206
572
  begin
207
- @handler.addEdges(args.edgeType, args.ids1, args.ids2)
573
+ @handler.addEdges(args.edgeType, args.sourceNodes, args.targetNodes)
208
574
  rescue ::Teapot::TempestDB::UndefinedGraphException => error1
209
575
  result.error1 = error1
210
576
  rescue ::Teapot::TempestDB::UnequalListSizeException => error2
@@ -217,16 +583,14 @@ module Teapot
217
583
 
218
584
  # HELPER FUNCTIONS AND STRUCTURES
219
585
 
220
- class GetMultiNodeAttributeAsJSON_args
586
+ class OutDegree_args
221
587
  include ::Thrift::Struct, ::Thrift::Struct_Union
222
- NODETYPE = 1
223
- NODEIDS = 2
224
- ATTRIBUTENAME = 3
588
+ EDGETYPE = 1
589
+ NODE = 2
225
590
 
226
591
  FIELDS = {
227
- NODETYPE => {:type => ::Thrift::Types::STRING, :name => 'nodeType'},
228
- NODEIDS => {:type => ::Thrift::Types::LIST, :name => 'nodeIds', :element => {:type => ::Thrift::Types::I64}},
229
- ATTRIBUTENAME => {:type => ::Thrift::Types::STRING, :name => 'attributeName'}
592
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
593
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node}
230
594
  }
231
595
 
232
596
  def struct_fields; FIELDS; end
@@ -237,16 +601,16 @@ module Teapot
237
601
  ::Thrift::Struct.generate_accessors self
238
602
  end
239
603
 
240
- class GetMultiNodeAttributeAsJSON_result
604
+ class OutDegree_result
241
605
  include ::Thrift::Struct, ::Thrift::Struct_Union
242
606
  SUCCESS = 0
243
- ERROR1 = 1
244
- ERROR2 = 2
607
+ EX1 = 1
608
+ EX2 = 2
245
609
 
246
610
  FIELDS = {
247
- SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRING}},
248
- ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
249
- ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::UndefinedAttributeException}
611
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
612
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
613
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidArgumentException}
250
614
  }
251
615
 
252
616
  def struct_fields; FIELDS; end
@@ -257,14 +621,14 @@ module Teapot
257
621
  ::Thrift::Struct.generate_accessors self
258
622
  end
259
623
 
260
- class Nodes_args
624
+ class InDegree_args
261
625
  include ::Thrift::Struct, ::Thrift::Struct_Union
262
- NODETYPE = 1
263
- SQLCLAUSE = 2
626
+ EDGETYPE = 1
627
+ NODE = 2
264
628
 
265
629
  FIELDS = {
266
- NODETYPE => {:type => ::Thrift::Types::STRING, :name => 'nodeType'},
267
- SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'}
630
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
631
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node}
268
632
  }
269
633
 
270
634
  def struct_fields; FIELDS; end
@@ -275,16 +639,16 @@ module Teapot
275
639
  ::Thrift::Struct.generate_accessors self
276
640
  end
277
641
 
278
- class Nodes_result
642
+ class InDegree_result
279
643
  include ::Thrift::Struct, ::Thrift::Struct_Union
280
644
  SUCCESS = 0
281
- ERROR1 = 1
282
- ERROR2 = 2
645
+ EX1 = 1
646
+ EX2 = 2
283
647
 
284
648
  FIELDS = {
285
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::I64}},
286
- ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
287
- ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::SQLException}
649
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
650
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
651
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidArgumentException}
288
652
  }
289
653
 
290
654
  def struct_fields; FIELDS; end
@@ -295,22 +659,14 @@ module Teapot
295
659
  ::Thrift::Struct.generate_accessors self
296
660
  end
297
661
 
298
- class KStepOutNeighborsFiltered_args
662
+ class OutNeighbors_args
299
663
  include ::Thrift::Struct, ::Thrift::Struct_Union
300
664
  EDGETYPE = 1
301
- SOURCEID = 2
302
- K = 3
303
- SQLCLAUSE = 4
304
- FILTER = 5
305
- ALTERNATING = 6
665
+ NODE = 2
306
666
 
307
667
  FIELDS = {
308
668
  EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
309
- SOURCEID => {:type => ::Thrift::Types::I64, :name => 'sourceId'},
310
- K => {:type => ::Thrift::Types::I32, :name => 'k'},
311
- SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'},
312
- FILTER => {:type => ::Thrift::Types::MAP, :name => 'filter', :key => {:type => ::Thrift::Types::I32, :enum_class => ::Teapot::TempestDB::DegreeFilterTypes}, :value => {:type => ::Thrift::Types::I32}},
313
- ALTERNATING => {:type => ::Thrift::Types::BOOL, :name => 'alternating'}
669
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node}
314
670
  }
315
671
 
316
672
  def struct_fields; FIELDS; end
@@ -321,20 +677,16 @@ module Teapot
321
677
  ::Thrift::Struct.generate_accessors self
322
678
  end
323
679
 
324
- class KStepOutNeighborsFiltered_result
680
+ class OutNeighbors_result
325
681
  include ::Thrift::Struct, ::Thrift::Struct_Union
326
682
  SUCCESS = 0
327
- ERROR1 = 1
328
- ERROR2 = 2
329
- ERROR3 = 3
330
- ERROR4 = 4
683
+ EX1 = 1
684
+ EX2 = 2
331
685
 
332
686
  FIELDS = {
333
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::I64}},
334
- ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
335
- ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::InvalidArgumentException},
336
- ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::SQLException},
337
- ERROR4 => {:type => ::Thrift::Types::STRUCT, :name => 'error4', :class => ::InvalidNodeIdException}
687
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
688
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
689
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidArgumentException}
338
690
  }
339
691
 
340
692
  def struct_fields; FIELDS; end
@@ -345,22 +697,14 @@ module Teapot
345
697
  ::Thrift::Struct.generate_accessors self
346
698
  end
347
699
 
348
- class KStepInNeighborsFiltered_args
700
+ class InNeighbors_args
349
701
  include ::Thrift::Struct, ::Thrift::Struct_Union
350
702
  EDGETYPE = 1
351
- SOURCEID = 2
352
- K = 3
353
- SQLCLAUSE = 4
354
- FILTER = 5
355
- ALTERNATING = 6
703
+ NODE = 2
356
704
 
357
705
  FIELDS = {
358
706
  EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
359
- SOURCEID => {:type => ::Thrift::Types::I64, :name => 'sourceId'},
360
- K => {:type => ::Thrift::Types::I32, :name => 'k'},
361
- SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'},
362
- FILTER => {:type => ::Thrift::Types::MAP, :name => 'filter', :key => {:type => ::Thrift::Types::I32, :enum_class => ::Teapot::TempestDB::DegreeFilterTypes}, :value => {:type => ::Thrift::Types::I32}},
363
- ALTERNATING => {:type => ::Thrift::Types::BOOL, :name => 'alternating'}
707
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node}
364
708
  }
365
709
 
366
710
  def struct_fields; FIELDS; end
@@ -371,7 +715,179 @@ module Teapot
371
715
  ::Thrift::Struct.generate_accessors self
372
716
  end
373
717
 
374
- class KStepInNeighborsFiltered_result
718
+ class InNeighbors_result
719
+ include ::Thrift::Struct, ::Thrift::Struct_Union
720
+ SUCCESS = 0
721
+ EX1 = 1
722
+ EX2 = 2
723
+
724
+ FIELDS = {
725
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
726
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
727
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidArgumentException}
728
+ }
729
+
730
+ def struct_fields; FIELDS; end
731
+
732
+ def validate
733
+ end
734
+
735
+ ::Thrift::Struct.generate_accessors self
736
+ end
737
+
738
+ class OutNeighbor_args
739
+ include ::Thrift::Struct, ::Thrift::Struct_Union
740
+ EDGETYPE = 1
741
+ NODE = 2
742
+ I = 3
743
+
744
+ FIELDS = {
745
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
746
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node},
747
+ I => {:type => ::Thrift::Types::I32, :name => 'i'}
748
+ }
749
+
750
+ def struct_fields; FIELDS; end
751
+
752
+ def validate
753
+ end
754
+
755
+ ::Thrift::Struct.generate_accessors self
756
+ end
757
+
758
+ class OutNeighbor_result
759
+ include ::Thrift::Struct, ::Thrift::Struct_Union
760
+ SUCCESS = 0
761
+ EX1 = 1
762
+ EX2 = 2
763
+ EX3 = 3
764
+
765
+ FIELDS = {
766
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Teapot::TempestDB::Node},
767
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
768
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidIndexException},
769
+ EX3 => {:type => ::Thrift::Types::STRUCT, :name => 'ex3', :class => ::Teapot::TempestDB::InvalidArgumentException}
770
+ }
771
+
772
+ def struct_fields; FIELDS; end
773
+
774
+ def validate
775
+ end
776
+
777
+ ::Thrift::Struct.generate_accessors self
778
+ end
779
+
780
+ class InNeighbor_args
781
+ include ::Thrift::Struct, ::Thrift::Struct_Union
782
+ EDGETYPE = 1
783
+ NODE = 2
784
+ I = 3
785
+
786
+ FIELDS = {
787
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
788
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node},
789
+ I => {:type => ::Thrift::Types::I32, :name => 'i'}
790
+ }
791
+
792
+ def struct_fields; FIELDS; end
793
+
794
+ def validate
795
+ end
796
+
797
+ ::Thrift::Struct.generate_accessors self
798
+ end
799
+
800
+ class InNeighbor_result
801
+ include ::Thrift::Struct, ::Thrift::Struct_Union
802
+ SUCCESS = 0
803
+ EX1 = 1
804
+ EX2 = 2
805
+ EX3 = 3
806
+
807
+ FIELDS = {
808
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Teapot::TempestDB::Node},
809
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
810
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidIndexException},
811
+ EX3 => {:type => ::Thrift::Types::STRUCT, :name => 'ex3', :class => ::Teapot::TempestDB::InvalidArgumentException}
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 ConnectedComponent_args
823
+ include ::Thrift::Struct, ::Thrift::Struct_Union
824
+ SOURCE = 1
825
+ EDGETYPES = 2
826
+ MAXSIZE = 3
827
+
828
+ FIELDS = {
829
+ SOURCE => {:type => ::Thrift::Types::STRUCT, :name => 'source', :class => ::Teapot::TempestDB::Node},
830
+ EDGETYPES => {:type => ::Thrift::Types::LIST, :name => 'edgeTypes', :element => {:type => ::Thrift::Types::STRING}},
831
+ MAXSIZE => {:type => ::Thrift::Types::I32, :name => 'maxSize'}
832
+ }
833
+
834
+ def struct_fields; FIELDS; end
835
+
836
+ def validate
837
+ end
838
+
839
+ ::Thrift::Struct.generate_accessors self
840
+ end
841
+
842
+ class ConnectedComponent_result
843
+ include ::Thrift::Struct, ::Thrift::Struct_Union
844
+ SUCCESS = 0
845
+ ERROR1 = 1
846
+ ERROR2 = 2
847
+ ERROR3 = 3
848
+
849
+ FIELDS = {
850
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
851
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
852
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidNodeIdException},
853
+ ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::InvalidArgumentException}
854
+ }
855
+
856
+ def struct_fields; FIELDS; end
857
+
858
+ def validate
859
+ end
860
+
861
+ ::Thrift::Struct.generate_accessors self
862
+ end
863
+
864
+ class KStepOutNeighborsFiltered_args
865
+ include ::Thrift::Struct, ::Thrift::Struct_Union
866
+ EDGETYPE = 1
867
+ SOURCE = 2
868
+ K = 3
869
+ SQLCLAUSE = 4
870
+ FILTER = 5
871
+ ALTERNATING = 6
872
+
873
+ FIELDS = {
874
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
875
+ SOURCE => {:type => ::Thrift::Types::STRUCT, :name => 'source', :class => ::Teapot::TempestDB::Node},
876
+ K => {:type => ::Thrift::Types::I32, :name => 'k'},
877
+ SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'},
878
+ FILTER => {:type => ::Thrift::Types::MAP, :name => 'filter', :key => {:type => ::Thrift::Types::I32, :enum_class => ::Teapot::TempestDB::DegreeFilterTypes}, :value => {:type => ::Thrift::Types::I32}},
879
+ ALTERNATING => {:type => ::Thrift::Types::BOOL, :name => 'alternating'}
880
+ }
881
+
882
+ def struct_fields; FIELDS; end
883
+
884
+ def validate
885
+ end
886
+
887
+ ::Thrift::Struct.generate_accessors self
888
+ end
889
+
890
+ class KStepOutNeighborsFiltered_result
375
891
  include ::Thrift::Struct, ::Thrift::Struct_Union
376
892
  SUCCESS = 0
377
893
  ERROR1 = 1
@@ -380,11 +896,11 @@ module Teapot
380
896
  ERROR4 = 4
381
897
 
382
898
  FIELDS = {
383
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::I64}},
899
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
384
900
  ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
385
- ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::InvalidArgumentException},
901
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidArgumentException},
386
902
  ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::SQLException},
387
- ERROR4 => {:type => ::Thrift::Types::STRUCT, :name => 'error4', :class => ::InvalidNodeIdException}
903
+ ERROR4 => {:type => ::Thrift::Types::STRUCT, :name => 'error4', :class => ::Teapot::TempestDB::InvalidNodeIdException}
388
904
  }
389
905
 
390
906
  def struct_fields; FIELDS; end
@@ -395,19 +911,65 @@ module Teapot
395
911
  ::Thrift::Struct.generate_accessors self
396
912
  end
397
913
 
398
- class Ppr_args
914
+ class KStepInNeighborsFiltered_args
399
915
  include ::Thrift::Struct, ::Thrift::Struct_Union
400
916
  EDGETYPE = 1
917
+ SOURCE = 2
918
+ K = 3
919
+ SQLCLAUSE = 4
920
+ FILTER = 5
921
+ ALTERNATING = 6
922
+
923
+ FIELDS = {
924
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
925
+ SOURCE => {:type => ::Thrift::Types::STRUCT, :name => 'source', :class => ::Teapot::TempestDB::Node},
926
+ K => {:type => ::Thrift::Types::I32, :name => 'k'},
927
+ SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'},
928
+ FILTER => {:type => ::Thrift::Types::MAP, :name => 'filter', :key => {:type => ::Thrift::Types::I32, :enum_class => ::Teapot::TempestDB::DegreeFilterTypes}, :value => {:type => ::Thrift::Types::I32}},
929
+ ALTERNATING => {:type => ::Thrift::Types::BOOL, :name => 'alternating'}
930
+ }
931
+
932
+ def struct_fields; FIELDS; end
933
+
934
+ def validate
935
+ end
936
+
937
+ ::Thrift::Struct.generate_accessors self
938
+ end
939
+
940
+ class KStepInNeighborsFiltered_result
941
+ include ::Thrift::Struct, ::Thrift::Struct_Union
942
+ SUCCESS = 0
943
+ ERROR1 = 1
944
+ ERROR2 = 2
945
+ ERROR3 = 3
946
+ ERROR4 = 4
947
+
948
+ FIELDS = {
949
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
950
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
951
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidArgumentException},
952
+ ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::SQLException},
953
+ ERROR4 => {:type => ::Thrift::Types::STRUCT, :name => 'error4', :class => ::Teapot::TempestDB::InvalidNodeIdException}
954
+ }
955
+
956
+ def struct_fields; FIELDS; end
957
+
958
+ def validate
959
+ end
960
+
961
+ ::Thrift::Struct.generate_accessors self
962
+ end
963
+
964
+ class PprUndirected_args
965
+ include ::Thrift::Struct, ::Thrift::Struct_Union
966
+ EDGETYPES = 1
401
967
  SEEDS = 2
402
- SEEDTYPE = 3
403
- TARGETTYPE = 4
404
968
  PAGERANKPARAMS = 5
405
969
 
406
970
  FIELDS = {
407
- EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
408
- SEEDS => {:type => ::Thrift::Types::LIST, :name => 'seeds', :element => {:type => ::Thrift::Types::I64}},
409
- SEEDTYPE => {:type => ::Thrift::Types::STRING, :name => 'seedType'},
410
- TARGETTYPE => {:type => ::Thrift::Types::STRING, :name => 'targetType'},
971
+ EDGETYPES => {:type => ::Thrift::Types::LIST, :name => 'edgeTypes', :element => {:type => ::Thrift::Types::STRING}},
972
+ SEEDS => {:type => ::Thrift::Types::LIST, :name => 'seeds', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
411
973
  PAGERANKPARAMS => {:type => ::Thrift::Types::STRUCT, :name => 'pageRankParams', :class => ::Teapot::TempestDB::MonteCarloPageRankParams}
412
974
  }
413
975
 
@@ -419,7 +981,7 @@ module Teapot
419
981
  ::Thrift::Struct.generate_accessors self
420
982
  end
421
983
 
422
- class Ppr_result
984
+ class PprUndirected_result
423
985
  include ::Thrift::Struct, ::Thrift::Struct_Union
424
986
  SUCCESS = 0
425
987
  ERROR1 = 1
@@ -427,10 +989,272 @@ module Teapot
427
989
  ERROR3 = 3
428
990
 
429
991
  FIELDS = {
430
- SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::DOUBLE}},
992
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}, :value => {:type => ::Thrift::Types::DOUBLE}},
993
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
994
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidNodeIdException},
995
+ ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::InvalidArgumentException}
996
+ }
997
+
998
+ def struct_fields; FIELDS; end
999
+
1000
+ def validate
1001
+ end
1002
+
1003
+ ::Thrift::Struct.generate_accessors self
1004
+ end
1005
+
1006
+ class PprSingleTarget_args
1007
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1008
+ EDGETYPE = 1
1009
+ SEEDNODES = 2
1010
+ TARGETNODE = 3
1011
+ BIPPRPARAMS = 4
1012
+
1013
+ FIELDS = {
1014
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
1015
+ SEEDNODES => {:type => ::Thrift::Types::LIST, :name => 'seedNodes', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
1016
+ TARGETNODE => {:type => ::Thrift::Types::STRUCT, :name => 'targetNode', :class => ::Teapot::TempestDB::Node},
1017
+ BIPPRPARAMS => {:type => ::Thrift::Types::STRUCT, :name => 'biPPRParams', :class => ::Teapot::TempestDB::BidirectionalPPRParams}
1018
+ }
1019
+
1020
+ def struct_fields; FIELDS; end
1021
+
1022
+ def validate
1023
+ end
1024
+
1025
+ ::Thrift::Struct.generate_accessors self
1026
+ end
1027
+
1028
+ class PprSingleTarget_result
1029
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1030
+ SUCCESS = 0
1031
+ EX1 = 1
1032
+ EX2 = 2
1033
+
1034
+ FIELDS = {
1035
+ SUCCESS => {:type => ::Thrift::Types::DOUBLE, :name => 'success'},
1036
+ EX1 => {:type => ::Thrift::Types::STRUCT, :name => 'ex1', :class => ::Teapot::TempestDB::InvalidNodeIdException},
1037
+ EX2 => {:type => ::Thrift::Types::STRUCT, :name => 'ex2', :class => ::Teapot::TempestDB::InvalidArgumentException}
1038
+ }
1039
+
1040
+ def struct_fields; FIELDS; end
1041
+
1042
+ def validate
1043
+ end
1044
+
1045
+ ::Thrift::Struct.generate_accessors self
1046
+ end
1047
+
1048
+ class NodeCount_args
1049
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1050
+ EDGETYPE = 1
1051
+
1052
+ FIELDS = {
1053
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'}
1054
+ }
1055
+
1056
+ def struct_fields; FIELDS; end
1057
+
1058
+ def validate
1059
+ end
1060
+
1061
+ ::Thrift::Struct.generate_accessors self
1062
+ end
1063
+
1064
+ class NodeCount_result
1065
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1066
+ SUCCESS = 0
1067
+ EX = 1
1068
+
1069
+ FIELDS = {
1070
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
1071
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Teapot::TempestDB::InvalidArgumentException}
1072
+ }
1073
+
1074
+ def struct_fields; FIELDS; end
1075
+
1076
+ def validate
1077
+ end
1078
+
1079
+ ::Thrift::Struct.generate_accessors self
1080
+ end
1081
+
1082
+ class EdgeCount_args
1083
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1084
+ EDGETYPE = 1
1085
+
1086
+ FIELDS = {
1087
+ EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'}
1088
+ }
1089
+
1090
+ def struct_fields; FIELDS; end
1091
+
1092
+ def validate
1093
+ end
1094
+
1095
+ ::Thrift::Struct.generate_accessors self
1096
+ end
1097
+
1098
+ class EdgeCount_result
1099
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1100
+ SUCCESS = 0
1101
+ EX = 1
1102
+
1103
+ FIELDS = {
1104
+ SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'},
1105
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Teapot::TempestDB::InvalidArgumentException}
1106
+ }
1107
+
1108
+ def struct_fields; FIELDS; end
1109
+
1110
+ def validate
1111
+ end
1112
+
1113
+ ::Thrift::Struct.generate_accessors self
1114
+ end
1115
+
1116
+ class Nodes_args
1117
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1118
+ NODETYPE = 1
1119
+ SQLCLAUSE = 2
1120
+
1121
+ FIELDS = {
1122
+ NODETYPE => {:type => ::Thrift::Types::STRING, :name => 'nodeType'},
1123
+ SQLCLAUSE => {:type => ::Thrift::Types::STRING, :name => 'sqlClause'}
1124
+ }
1125
+
1126
+ def struct_fields; FIELDS; end
1127
+
1128
+ def validate
1129
+ end
1130
+
1131
+ ::Thrift::Struct.generate_accessors self
1132
+ end
1133
+
1134
+ class Nodes_result
1135
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1136
+ SUCCESS = 0
1137
+ ERROR1 = 1
1138
+ ERROR2 = 2
1139
+
1140
+ FIELDS = {
1141
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
1142
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
1143
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::SQLException}
1144
+ }
1145
+
1146
+ def struct_fields; FIELDS; end
1147
+
1148
+ def validate
1149
+ end
1150
+
1151
+ ::Thrift::Struct.generate_accessors self
1152
+ end
1153
+
1154
+ class GetMultiNodeAttributeAsJSON_args
1155
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1156
+ NODES = 1
1157
+ ATTRIBUTENAME = 2
1158
+
1159
+ FIELDS = {
1160
+ NODES => {:type => ::Thrift::Types::LIST, :name => 'nodes', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
1161
+ ATTRIBUTENAME => {:type => ::Thrift::Types::STRING, :name => 'attributeName'}
1162
+ }
1163
+
1164
+ def struct_fields; FIELDS; end
1165
+
1166
+ def validate
1167
+ end
1168
+
1169
+ ::Thrift::Struct.generate_accessors self
1170
+ end
1171
+
1172
+ class GetMultiNodeAttributeAsJSON_result
1173
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1174
+ SUCCESS = 0
1175
+ ERROR1 = 1
1176
+ ERROR2 = 2
1177
+
1178
+ FIELDS = {
1179
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}, :value => {:type => ::Thrift::Types::STRING}},
1180
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
1181
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidArgumentException}
1182
+ }
1183
+
1184
+ def struct_fields; FIELDS; end
1185
+
1186
+ def validate
1187
+ end
1188
+
1189
+ ::Thrift::Struct.generate_accessors self
1190
+ end
1191
+
1192
+ class AddNode_args
1193
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1194
+ NODE = 1
1195
+
1196
+ FIELDS = {
1197
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node}
1198
+ }
1199
+
1200
+ def struct_fields; FIELDS; end
1201
+
1202
+ def validate
1203
+ end
1204
+
1205
+ ::Thrift::Struct.generate_accessors self
1206
+ end
1207
+
1208
+ class AddNode_result
1209
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1210
+ ERROR1 = 1
1211
+ ERROR2 = 2
1212
+ ERROR3 = 3
1213
+
1214
+ FIELDS = {
1215
+ ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
1216
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidArgumentException},
1217
+ ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::SQLException}
1218
+ }
1219
+
1220
+ def struct_fields; FIELDS; end
1221
+
1222
+ def validate
1223
+ end
1224
+
1225
+ ::Thrift::Struct.generate_accessors self
1226
+ end
1227
+
1228
+ class SetNodeAttribute_args
1229
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1230
+ NODE = 1
1231
+ ATTRIBUTENAME = 2
1232
+ ATTRIBUTEVALUE = 3
1233
+
1234
+ FIELDS = {
1235
+ NODE => {:type => ::Thrift::Types::STRUCT, :name => 'node', :class => ::Teapot::TempestDB::Node},
1236
+ ATTRIBUTENAME => {:type => ::Thrift::Types::STRING, :name => 'attributeName'},
1237
+ ATTRIBUTEVALUE => {:type => ::Thrift::Types::STRING, :name => 'attributeValue'}
1238
+ }
1239
+
1240
+ def struct_fields; FIELDS; end
1241
+
1242
+ def validate
1243
+ end
1244
+
1245
+ ::Thrift::Struct.generate_accessors self
1246
+ end
1247
+
1248
+ class SetNodeAttribute_result
1249
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1250
+ ERROR1 = 1
1251
+ ERROR2 = 2
1252
+ ERROR3 = 3
1253
+
1254
+ FIELDS = {
431
1255
  ERROR1 => {:type => ::Thrift::Types::STRUCT, :name => 'error1', :class => ::Teapot::TempestDB::UndefinedGraphException},
432
- ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::InvalidNodeIdException},
433
- ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::InvalidArgumentException}
1256
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Teapot::TempestDB::InvalidArgumentException},
1257
+ ERROR3 => {:type => ::Thrift::Types::STRUCT, :name => 'error3', :class => ::Teapot::TempestDB::SQLException}
434
1258
  }
435
1259
 
436
1260
  def struct_fields; FIELDS; end
@@ -444,13 +1268,13 @@ module Teapot
444
1268
  class AddEdges_args
445
1269
  include ::Thrift::Struct, ::Thrift::Struct_Union
446
1270
  EDGETYPE = 1
447
- IDS1 = 2
448
- IDS2 = 3
1271
+ SOURCENODES = 2
1272
+ TARGETNODES = 3
449
1273
 
450
1274
  FIELDS = {
451
1275
  EDGETYPE => {:type => ::Thrift::Types::STRING, :name => 'edgeType'},
452
- IDS1 => {:type => ::Thrift::Types::LIST, :name => 'ids1', :element => {:type => ::Thrift::Types::I64}},
453
- IDS2 => {:type => ::Thrift::Types::LIST, :name => 'ids2', :element => {:type => ::Thrift::Types::I64}}
1276
+ SOURCENODES => {:type => ::Thrift::Types::LIST, :name => 'sourceNodes', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}},
1277
+ TARGETNODES => {:type => ::Thrift::Types::LIST, :name => 'targetNodes', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Teapot::TempestDB::Node}}
454
1278
  }
455
1279
 
456
1280
  def struct_fields; FIELDS; end