Class: Graph

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/thrift/queryplan_types.rb

Constant Summary collapse

NODETYPE =
1
ROOTS =
2
ADJACENCYLIST =
3
FIELDS =
{
  NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType},
  ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}},
  ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



100
# File 'lib/thrift/queryplan_types.rb', line 100

def struct_fields; FIELDS; end

#validateObject



102
103
104
105
106
# File 'lib/thrift/queryplan_types.rb', line 102

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