Class: OrientDbClient::ProtocolFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/orient_db_client/protocol_factory.rb

Constant Summary collapse

PROTOCOLS =

Orient server 1.0 supports Protocols 7 and 9. Since Protocols 10 and 11 are not implemented by this client, protocol 9 is substituted to allow connections to succeed.

{
  '7' => Protocols::Protocol7,
    '9' => Protocols::Protocol9,
    '10' => Protocols::Protocol9,
    '11' => Protocols::Protocol9
}

Class Method Summary collapse

Class Method Details

.get_protocol(version) ⇒ Object



18
19
20
# File 'lib/orient_db_client/protocol_factory.rb', line 18

def self.get_protocol(version)
  PROTOCOLS[version.to_s] or raise UnsupportedProtocolError.new(version)
end