Class: Flock::ExecuteOperation

Inherits:
Object
  • Object
show all
Defined in:
lib/flock/operations/execute_operation.rb

Instance Method Summary collapse

Constructor Details

#initialize(operation_type, query, position = nil) ⇒ ExecuteOperation

Returns a new instance of ExecuteOperation.



3
4
5
# File 'lib/flock/operations/execute_operation.rb', line 3

def initialize(operation_type, query, position = nil)
  @operation_type, @query, @position = operation_type, query, position
end

Instance Method Details

#to_thriftObject



7
8
9
10
11
12
13
# File 'lib/flock/operations/execute_operation.rb', line 7

def to_thrift
  op = Edges::ExecuteOperation.new
  op.operation_type = @operation_type
  op.position = @position if @position
  op.term = @query.to_thrift
  op
end