Class: Rebat::Thrift::RebatDB::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/rebat/thrift/rebat_d_b.rb

Instance Method Summary collapse

Instance Method Details

#addQuery(edge) ⇒ Object



16
17
18
19
# File 'lib/rebat/thrift/rebat_d_b.rb', line 16

def addQuery(edge)
  send_addQuery(edge)
  return recv_addQuery()
end

#deleteQuery(edge) ⇒ Object



31
32
33
34
# File 'lib/rebat/thrift/rebat_d_b.rb', line 31

def deleteQuery(edge)
  send_deleteQuery(edge)
  return recv_deleteQuery()
end

#recv_addQueryObject

Raises:

  • (::Thrift::ApplicationException)


25
26
27
28
29
# File 'lib/rebat/thrift/rebat_d_b.rb', line 25

def recv_addQuery()
  result = receive_message(AddQuery_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'addQuery failed: unknown result')
end

#recv_deleteQueryObject

Raises:

  • (::Thrift::ApplicationException)


40
41
42
43
44
# File 'lib/rebat/thrift/rebat_d_b.rb', line 40

def recv_deleteQuery()
  result = receive_message(DeleteQuery_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'deleteQuery failed: unknown result')
end

#recv_selectQueryObject

Raises:

  • (::Thrift::ApplicationException)


70
71
72
73
74
# File 'lib/rebat/thrift/rebat_d_b.rb', line 70

def recv_selectQuery()
  result = receive_message(SelectQuery_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'selectQuery failed: unknown result')
end

#recv_truncateObject

Raises:

  • (::Thrift::ApplicationException)


85
86
87
88
89
# File 'lib/rebat/thrift/rebat_d_b.rb', line 85

def recv_truncate()
  result = receive_message(Truncate_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'truncate failed: unknown result')
end

#recv_updateWeightQueryObject

Raises:

  • (::Thrift::ApplicationException)


55
56
57
58
59
# File 'lib/rebat/thrift/rebat_d_b.rb', line 55

def recv_updateWeightQuery()
  result = receive_message(UpdateWeightQuery_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'updateWeightQuery failed: unknown result')
end

#selectQuery(queryList) ⇒ Object



61
62
63
64
# File 'lib/rebat/thrift/rebat_d_b.rb', line 61

def selectQuery(queryList)
  send_selectQuery(queryList)
  return recv_selectQuery()
end

#send_addQuery(edge) ⇒ Object



21
22
23
# File 'lib/rebat/thrift/rebat_d_b.rb', line 21

def send_addQuery(edge)
  send_message('addQuery', AddQuery_args, :edge => edge)
end

#send_deleteQuery(edge) ⇒ Object



36
37
38
# File 'lib/rebat/thrift/rebat_d_b.rb', line 36

def send_deleteQuery(edge)
  send_message('deleteQuery', DeleteQuery_args, :edge => edge)
end

#send_selectQuery(queryList) ⇒ Object



66
67
68
# File 'lib/rebat/thrift/rebat_d_b.rb', line 66

def send_selectQuery(queryList)
  send_message('selectQuery', SelectQuery_args, :queryList => queryList)
end

#send_truncateObject



81
82
83
# File 'lib/rebat/thrift/rebat_d_b.rb', line 81

def send_truncate()
  send_message('truncate', Truncate_args)
end

#send_updateWeightQuery(edge, weight) ⇒ Object



51
52
53
# File 'lib/rebat/thrift/rebat_d_b.rb', line 51

def send_updateWeightQuery(edge, weight)
  send_message('updateWeightQuery', UpdateWeightQuery_args, :edge => edge, :weight => weight)
end

#truncateObject



76
77
78
79
# File 'lib/rebat/thrift/rebat_d_b.rb', line 76

def truncate()
  send_truncate()
  return recv_truncate()
end

#updateWeightQuery(edge, weight) ⇒ Object



46
47
48
49
# File 'lib/rebat/thrift/rebat_d_b.rb', line 46

def updateWeightQuery(edge, weight)
  send_updateWeightQuery(edge, weight)
  return recv_updateWeightQuery()
end