Class: Mongo::Server::Description::Features

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo/server/description/features.rb

Overview

Defines behaviour around what features a specific server supports.

Since:

  • 2.0.0

Constant Summary

MAPPINGS =

List of features and the wire protocol version they appear in.

Since:

  • 2.0.0

{
  :collation => 5,
  :max_staleness => 5,
  :find_command => 4,
  :list_collections => 3,
  :list_indexes => 3,
  :scram_sha_1 => 3,
  :write_command => 2,
  :users_info => 2
}.freeze
DRIVER_WIRE_VERSIONS =

The wire protocol versions that this version of the driver supports.

Since:

  • 2.0.0

(0..5).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_wire_versions) ⇒ Features

Initialize the features.

Examples:

Initialize the features.

Features.new(0..3)

Parameters:

  • server_wire_versions (Range)

    The server supported wire versions.

Since:

  • 2.0.0



74
75
76
77
# File 'lib/mongo/server/description/features.rb', line 74

def initialize(server_wire_versions)
  @server_wire_versions = server_wire_versions
  check_driver_support!
end

Instance Attribute Details

#server_wire_versionsRange (readonly)

Returns server_wire_versions The server's supported wire versions.

Returns:

  • (Range)

    server_wire_versions The server's supported wire versions.

Since:

  • 2.0.0



63
64
65
# File 'lib/mongo/server/description/features.rb', line 63

def server_wire_versions
  @server_wire_versions
end