Class: Flock::Edges::ExecuteOperation

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/flock/gen-rb/flockdb_types.rb

Constant Summary collapse

OPERATION_TYPE =
1
TERM =
2
POSITION =
3
FIELDS =
{
  OPERATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'operation_type', :enum_class => Flock::Edges::ExecuteOperationType},
  TERM => {:type => ::Thrift::Types::STRUCT, :name => 'term', :class => Flock::Edges::QueryTerm},
  POSITION => {:type => ::Thrift::Types::I64, :name => 'position', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



211
# File 'lib/flock/gen-rb/flockdb_types.rb', line 211

def struct_fields; FIELDS; end

#validateObject



213
214
215
216
217
# File 'lib/flock/gen-rb/flockdb_types.rb', line 213

def validate
  unless @operation_type.nil? || Flock::Edges::ExecuteOperationType::VALID_VALUES.include?(@operation_type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operation_type!')
  end
end