mongo 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/mongo/auth/cr/conversation.rb +0 -1
- data/lib/mongo/client.rb +19 -5
- data/lib/mongo/cluster.rb +84 -16
- data/lib/mongo/cluster/topology.rb +3 -4
- data/lib/mongo/cluster/topology/replica_set.rb +75 -0
- data/lib/mongo/cluster/topology/sharded.rb +60 -0
- data/lib/mongo/cluster/topology/single.rb +51 -0
- data/lib/mongo/cluster/topology/unknown.rb +62 -0
- data/lib/mongo/error/invalid_bulk_operation.rb +2 -1
- data/lib/mongo/event.rb +9 -9
- data/lib/mongo/event/{server_added.rb → description_changed.rb} +6 -5
- data/lib/mongo/event/{server_removed.rb → standalone_discovered.rb} +15 -15
- data/lib/mongo/operation/aggregate.rb +6 -5
- data/lib/mongo/operation/command.rb +5 -6
- data/lib/mongo/operation/kill_cursors.rb +3 -2
- data/lib/mongo/operation/map_reduce.rb +6 -5
- data/lib/mongo/operation/read/collections_info.rb +5 -4
- data/lib/mongo/operation/read/get_more.rb +8 -7
- data/lib/mongo/operation/read/indexes.rb +4 -3
- data/lib/mongo/operation/read/list_collections.rb +5 -4
- data/lib/mongo/operation/read/list_indexes.rb +7 -6
- data/lib/mongo/operation/read/query.rb +8 -7
- data/lib/mongo/operation/read_preferrable.rb +6 -2
- data/lib/mongo/operation/write/bulk/bulk_delete.rb +13 -12
- data/lib/mongo/operation/write/bulk/bulk_insert.rb +10 -9
- data/lib/mongo/operation/write/bulk/bulk_insert/result.rb +2 -2
- data/lib/mongo/operation/write/bulk/bulk_update.rb +12 -11
- data/lib/mongo/operation/write/create_index.rb +8 -7
- data/lib/mongo/operation/write/create_user.rb +4 -3
- data/lib/mongo/operation/write/delete.rb +13 -12
- data/lib/mongo/operation/write/drop_index.rb +6 -5
- data/lib/mongo/operation/write/insert.rb +8 -7
- data/lib/mongo/operation/write/insert/result.rb +1 -1
- data/lib/mongo/operation/write/remove_user.rb +4 -3
- data/lib/mongo/operation/write/update.rb +10 -9
- data/lib/mongo/operation/write/update_user.rb +4 -3
- data/lib/mongo/server.rb +8 -15
- data/lib/mongo/server/context.rb +2 -2
- data/lib/mongo/server/description.rb +65 -3
- data/lib/mongo/server/description/features.rb +2 -1
- data/lib/mongo/server/description/inspector.rb +5 -5
- data/lib/mongo/server/description/inspector/{server_added.rb → description_changed.rb} +3 -5
- data/lib/mongo/server/description/inspector/{server_removed.rb → standalone_discovered.rb} +12 -15
- data/lib/mongo/version.rb +1 -1
- data/spec/mongo/auth/cr_spec.rb +1 -1
- data/spec/mongo/auth/ldap_spec.rb +1 -1
- data/spec/mongo/auth/scram_spec.rb +1 -1
- data/spec/mongo/auth/x509_spec.rb +1 -1
- data/spec/mongo/client_spec.rb +4 -0
- data/spec/mongo/cluster/topology/replica_set_spec.rb +254 -4
- data/spec/mongo/cluster/topology/sharded_spec.rb +70 -19
- data/spec/mongo/cluster/topology/single_spec.rb +25 -4
- data/spec/mongo/cluster/topology/unknown_spec.rb +167 -0
- data/spec/mongo/cluster/topology_spec.rb +6 -6
- data/spec/mongo/cluster_spec.rb +179 -1
- data/spec/mongo/operation/read_preferrable_spec.rb +81 -28
- data/spec/mongo/operation/write/bulk/bulk_delete_spec.rb +1 -0
- data/spec/mongo/server/connection_pool_spec.rb +10 -10
- data/spec/mongo/server/connection_spec.rb +1 -1
- data/spec/mongo/server/description/features_spec.rb +23 -3
- data/spec/mongo/server/description/inspector/description_changed_spec.rb +78 -0
- data/spec/mongo/server/description_spec.rb +238 -0
- data/spec/mongo/server/monitor_spec.rb +1 -1
- data/spec/mongo/server_discovery_and_monitoring_spec.rb +20 -4
- data/spec/mongo/server_selection_spec.rb +2 -2
- data/spec/mongo/server_spec.rb +12 -8
- data/spec/support/authorization.rb +8 -8
- data/spec/support/sdam/rs/discover_passives.yml +36 -0
- data/spec/support/sdam/rs/new_primary_wrong_set_name.yml +2 -2
- data/spec/support/sdam/rs/primary_becomes_standalone.yml +1 -1
- data/spec/support/sdam/rs/primary_changes_set_name.yml +2 -2
- data/spec/support/sdam/rs/primary_disconnect.yml +1 -1
- data/spec/support/sdam/rs/primary_wrong_set_name.yml +1 -1
- data/spec/support/sdam/rs/secondary_wrong_set_name.yml +1 -1
- data/spec/support/sdam/rs/secondary_wrong_set_name_with_primary.yml +2 -2
- data/spec/support/sdam/sharded/single_mongos.yml +33 -0
- data/spec/support/shared/operation.rb +12 -4
- data/spec/support/shared/server_selector.rb +1 -1
- metadata +12 -10
- metadata.gz.sig +0 -0
- data/spec/mongo/server/description/inspector/server_added_spec.rb +0 -92
- data/spec/mongo/server/description/inspector/server_removed_spec.rb +0 -95
@@ -33,16 +33,17 @@ module Mongo
|
|
33
33
|
# :ordered => false
|
34
34
|
# })
|
35
35
|
#
|
36
|
-
#
|
36
|
+
# Initialization:
|
37
|
+
# param [ Hash ] spec The specifications for the insert.
|
37
38
|
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
39
|
+
# option spec :documents [ Array ] The documents to insert.
|
40
|
+
# option spec :db_name [ String ] The name of the database.
|
41
|
+
# option spec :coll_name [ String ] The name of the collection.
|
42
|
+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
|
43
|
+
# option spec :ordered [ true, false ] Whether the operations should be
|
44
|
+
# executed in order.
|
45
|
+
# option spec :options [ Hash ] Options for the command, if it ends up being a
|
46
|
+
# write command.
|
46
47
|
#
|
47
48
|
# @since 2.0.0
|
48
49
|
class BulkInsert
|
@@ -37,7 +37,7 @@ module Mongo
|
|
37
37
|
# Result.new(replies, inserted_ids)
|
38
38
|
#
|
39
39
|
# @param [ Protocol::Reply ] replies The wire protocol replies.
|
40
|
-
# @
|
40
|
+
# @param [ Array<Object> ] ids The ids of the inserted documents.
|
41
41
|
#
|
42
42
|
# @since 2.0.0
|
43
43
|
def initialize(replies, ids)
|
@@ -88,7 +88,7 @@ module Mongo
|
|
88
88
|
# Result.new(replies, inserted_ids)
|
89
89
|
#
|
90
90
|
# @param [ Protocol::Reply ] replies The wire protocol replies.
|
91
|
-
# @
|
91
|
+
# @param [ Array<Object> ] ids The ids of the inserted documents.
|
92
92
|
#
|
93
93
|
# @since 2.0.0
|
94
94
|
def initialize(replies, ids)
|
@@ -39,18 +39,19 @@ module Mongo
|
|
39
39
|
# :ordered => false
|
40
40
|
# })
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# Initialization:
|
43
|
+
# param [ Hash ] spec The specifications for the update.
|
43
44
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
45
|
+
# option spec :updates [ Array ] The update documents.
|
46
|
+
# option spec :db_name [ String ] The name of the database on which
|
47
|
+
# the query should be run.
|
48
|
+
# option spec :coll_name [ String ] The name of the collection on which
|
49
|
+
# the query should be run.
|
50
|
+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
|
51
|
+
# option spec :ordered [ true, false ] Whether the operations should be
|
52
|
+
# executed in order.
|
53
|
+
# option spec :options [ Hash ] Options for the command, if it ends up being a
|
54
|
+
# write command.
|
54
55
|
#
|
55
56
|
# @since 2.0.0
|
56
57
|
class BulkUpdate
|
@@ -30,14 +30,15 @@ module Mongo
|
|
30
30
|
# :index_name => 'name_1_age_-1'
|
31
31
|
# })
|
32
32
|
#
|
33
|
-
#
|
33
|
+
# Initialization:
|
34
|
+
# param [ Hash ] spec The specifications for the insert.
|
34
35
|
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
36
|
+
# option spec :index [ Hash ] The index spec to create.
|
37
|
+
# option spec :db_name [ String ] The name of the database.
|
38
|
+
# option spec :coll_name [ String ] The name of the collection.
|
39
|
+
# option spec :index_name [ String ] The name of the index.
|
40
|
+
# option spec :options [ Hash ] Options for the command, if it ends up being a
|
41
|
+
# write command.
|
41
42
|
#
|
42
43
|
# @since 2.0.0
|
43
44
|
class CreateIndex
|
@@ -22,10 +22,11 @@ module Mongo
|
|
22
22
|
# @example Initialize the operation.
|
23
23
|
# Write::CreateUser.new(:db_name => 'test', :user => user)
|
24
24
|
#
|
25
|
-
#
|
25
|
+
# Initialization:
|
26
|
+
# param [ Hash ] spec The specifications for the create.
|
26
27
|
#
|
27
|
-
#
|
28
|
-
#
|
28
|
+
# option spec :user [ Auth::User ] The user to create.
|
29
|
+
# option spec :db_name [ String ] The name of the database.
|
29
30
|
#
|
30
31
|
# @since 2.0.0
|
31
32
|
class CreateUser
|
@@ -31,19 +31,20 @@ module Mongo
|
|
31
31
|
# :write_concern => write_concern
|
32
32
|
# })
|
33
33
|
#
|
34
|
-
#
|
34
|
+
# Initialization:
|
35
|
+
# param [ Hash ] spec The specifications for the delete.
|
35
36
|
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
37
|
+
# option spec :delete [ Hash ] The delete document.
|
38
|
+
# option spec :db_name [ String ] The name of the database on which
|
39
|
+
# the delete should be executed.
|
40
|
+
# option spec :coll_name [ String ] The name of the collection on which
|
41
|
+
# the delete should be executed.
|
42
|
+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern
|
43
|
+
# for this operation.
|
44
|
+
# option spec :ordered [ true, false ] Whether the operations should be
|
45
|
+
# executed in order.
|
46
|
+
# option spec :options [Hash] Options for the command, if it ends up being a
|
47
|
+
# write command.
|
47
48
|
#
|
48
49
|
# @since 2.0.0
|
49
50
|
class Delete
|
@@ -25,12 +25,13 @@ module Mongo
|
|
25
25
|
# :index_name => 'name_1_age_-1'
|
26
26
|
# })
|
27
27
|
#
|
28
|
-
#
|
28
|
+
# Initialization:
|
29
|
+
# param [ Hash ] spec The specifications for the drop.
|
29
30
|
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
31
|
+
# option spec :index [ Hash ] The index spec to create.
|
32
|
+
# option spec :db_name [ String ] The name of the database.
|
33
|
+
# option spec :coll_name [ String ] The name of the collection.
|
34
|
+
# option spec :index_name [ String ] The name of the index.
|
34
35
|
#
|
35
36
|
# @since 2.0.0
|
36
37
|
class DropIndex
|
@@ -31,14 +31,15 @@ module Mongo
|
|
31
31
|
# :write_concern => write_concern
|
32
32
|
# })
|
33
33
|
#
|
34
|
-
#
|
34
|
+
# Initialization:
|
35
|
+
# param [ Hash ] spec The specifications for the insert.
|
35
36
|
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
37
|
+
# option spec :documents [ Array ] The documents to insert.
|
38
|
+
# option spec :db_name [ String ] The name of the database.
|
39
|
+
# option spec :coll_name [ String ] The name of the collection.
|
40
|
+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
|
41
|
+
# option spec :options [ Hash ] Options for the command, if it ends up being a
|
42
|
+
# write command.
|
42
43
|
#
|
43
44
|
# @since 2.0.0
|
44
45
|
class Insert
|
@@ -36,7 +36,7 @@ module Mongo
|
|
36
36
|
# Result.new(replies, inserted_ids)
|
37
37
|
#
|
38
38
|
# @param [ Protocol::Reply ] replies The wire protocol replies.
|
39
|
-
# @
|
39
|
+
# @param [ Array<Object> ] ids The ids of the inserted documents.
|
40
40
|
#
|
41
41
|
# @since 2.0.0
|
42
42
|
def initialize(replies, ids)
|
@@ -21,10 +21,11 @@ module Mongo
|
|
21
21
|
# @example Create the remove user operation.
|
22
22
|
# Write::RemoveUser.new(:db_name => 'test', :name => name)
|
23
23
|
#
|
24
|
-
#
|
24
|
+
# Initialization:
|
25
|
+
# param [ Hash ] spec The specifications for the remove.
|
25
26
|
#
|
26
|
-
#
|
27
|
-
#
|
27
|
+
# option spec :name [ String ] The user name.
|
28
|
+
# option spec :db_name [ String ] The name of the database.
|
28
29
|
#
|
29
30
|
# @since 2.0.0
|
30
31
|
class RemoveUser
|
@@ -37,16 +37,17 @@ module Mongo
|
|
37
37
|
# :write_concern => write_concern
|
38
38
|
# })
|
39
39
|
#
|
40
|
-
#
|
40
|
+
# Initialization:
|
41
|
+
# param [ Hash ] spec The specifications for the update.
|
41
42
|
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
43
|
+
# option spec :update [ Hash ] The update document.
|
44
|
+
# option spec :db_name [ String ] The name of the database on which
|
45
|
+
# the query should be run.
|
46
|
+
# option spec :coll_name [ String ] The name of the collection on which
|
47
|
+
# the query should be run.
|
48
|
+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
|
49
|
+
# option spec :options [ Hash ] Options for the command, if it ends up being a
|
50
|
+
# write command.
|
50
51
|
#
|
51
52
|
# @since 2.0.0
|
52
53
|
class Update
|
@@ -22,10 +22,11 @@ module Mongo
|
|
22
22
|
# @example Initialize the operation.
|
23
23
|
# Write::UpdateUser.new(:db_name => 'test', :user => user)
|
24
24
|
#
|
25
|
-
#
|
25
|
+
# Initialization:
|
26
|
+
# param [ Hash ] spec The specifications for the update.
|
26
27
|
#
|
27
|
-
#
|
28
|
-
#
|
28
|
+
# option spec :user [ Auth::User ] The user to update.
|
29
|
+
# option spec :db_name [ String ] The name of the database.
|
29
30
|
#
|
30
31
|
# @since 2.0.0
|
31
32
|
class UpdateUser
|
data/lib/mongo/server.rb
CHANGED
@@ -31,6 +31,9 @@ module Mongo
|
|
31
31
|
# @return [ String ] The configured address for the server.
|
32
32
|
attr_reader :address
|
33
33
|
|
34
|
+
# @return [ Cluster ] cluster The server cluster.
|
35
|
+
attr_reader :cluster
|
36
|
+
|
34
37
|
# @return [ Monitor ] monitor The server monitor.
|
35
38
|
attr_reader :monitor
|
36
39
|
|
@@ -105,15 +108,17 @@ module Mongo
|
|
105
108
|
# subscribe to the appropriate events.
|
106
109
|
#
|
107
110
|
# @example Initialize the server.
|
108
|
-
# Mongo::Server.new('127.0.0.1:27017', listeners)
|
111
|
+
# Mongo::Server.new('127.0.0.1:27017', cluster, listeners)
|
109
112
|
#
|
110
113
|
# @param [ Address ] address The host:port address to connect to.
|
114
|
+
# @param [ Cluster ] cluster The cluster the server belongs to.
|
111
115
|
# @param [ Event::Listeners ] event_listeners The event listeners.
|
112
116
|
# @param [ Hash ] options The server options.
|
113
117
|
#
|
114
118
|
# @since 2.0.0
|
115
|
-
def initialize(address, event_listeners, options = {})
|
119
|
+
def initialize(address, cluster, event_listeners, options = {})
|
116
120
|
@address = address
|
121
|
+
@cluster = cluster
|
117
122
|
@options = options.freeze
|
118
123
|
@monitor = Monitor.new(address, event_listeners, options)
|
119
124
|
monitor.scan!
|
@@ -123,7 +128,7 @@ module Mongo
|
|
123
128
|
# Get a pretty printed server inspection.
|
124
129
|
#
|
125
130
|
# @example Get the server inspection.
|
126
|
-
# server.
|
131
|
+
# server.inspect
|
127
132
|
#
|
128
133
|
# @return [ String ] The nice inspection string.
|
129
134
|
#
|
@@ -159,17 +164,5 @@ module Mongo
|
|
159
164
|
tags[k] && tags[k] == tag_set[k]
|
160
165
|
end
|
161
166
|
end
|
162
|
-
|
163
|
-
# Whether the slaveOk bit must be set for all queries sent to the server.
|
164
|
-
#
|
165
|
-
# @example Does the slaveOk bit need to be set for all queries sent to the server.
|
166
|
-
# server.slave_ok?
|
167
|
-
#
|
168
|
-
# @return [ true, false ] If the slaveOk bit needs to be set for all queries.
|
169
|
-
#
|
170
|
-
# @since 2.0.0
|
171
|
-
def slave_ok?
|
172
|
-
options[:slave_ok]
|
173
|
-
end
|
174
167
|
end
|
175
168
|
end
|
data/lib/mongo/server/context.rb
CHANGED
@@ -27,14 +27,14 @@ module Mongo
|
|
27
27
|
|
28
28
|
# Delegate state checks to the server.
|
29
29
|
def_delegators :@server,
|
30
|
+
:cluster,
|
30
31
|
:features,
|
31
32
|
:max_wire_version,
|
32
33
|
:max_write_batch_size,
|
33
34
|
:mongos?,
|
34
35
|
:primary?,
|
35
36
|
:secondary?,
|
36
|
-
:standalone
|
37
|
-
:slave_ok?
|
37
|
+
:standalone?
|
38
38
|
|
39
39
|
# Instantiate a server context.
|
40
40
|
#
|
@@ -124,6 +124,11 @@ module Mongo
|
|
124
124
|
# @since 2.0.0
|
125
125
|
TAGS = 'tags'.freeze
|
126
126
|
|
127
|
+
# Fields to exclude when comparing two descriptions.
|
128
|
+
#
|
129
|
+
# @since 2.0.6
|
130
|
+
EXCLUDE_FOR_COMPARISON = [ 'localTime' ]
|
131
|
+
|
127
132
|
# @return [ Address ] address The server's address.
|
128
133
|
attr_reader :address
|
129
134
|
|
@@ -157,7 +162,7 @@ module Mongo
|
|
157
162
|
#
|
158
163
|
# @since 2.0.0
|
159
164
|
def arbiters
|
160
|
-
config[ARBITERS] || []
|
165
|
+
@arbiters ||= (config[ARBITERS] || []).map { |s| s.downcase }
|
161
166
|
end
|
162
167
|
|
163
168
|
# Is the server a ghost in a replica set?
|
@@ -193,7 +198,7 @@ module Mongo
|
|
193
198
|
#
|
194
199
|
# @since 2.0.0
|
195
200
|
def hosts
|
196
|
-
config[HOSTS] || []
|
201
|
+
@hosts ||= (config[HOSTS] || []).map { |s| s.downcase }
|
197
202
|
end
|
198
203
|
|
199
204
|
# Instantiate the new server description from the result of the ismaster
|
@@ -344,7 +349,7 @@ module Mongo
|
|
344
349
|
#
|
345
350
|
# @since 2.0.0
|
346
351
|
def passives
|
347
|
-
config[PASSIVES] || []
|
352
|
+
@passives ||= (config[PASSIVES] || []).map { |s| s.downcase }
|
348
353
|
end
|
349
354
|
|
350
355
|
# Will return true if the server is a primary.
|
@@ -445,6 +450,63 @@ module Mongo
|
|
445
450
|
def wire_versions
|
446
451
|
min_wire_version..max_wire_version
|
447
452
|
end
|
453
|
+
|
454
|
+
# Is this description from the given server.
|
455
|
+
#
|
456
|
+
# @example Check if the description is from a given server.
|
457
|
+
# description.is_server?(server)
|
458
|
+
#
|
459
|
+
# @return [ true, false ] If the description is from the server.
|
460
|
+
#
|
461
|
+
# @since 2.0.6
|
462
|
+
def is_server?(server)
|
463
|
+
address == server.address
|
464
|
+
end
|
465
|
+
|
466
|
+
# Is a server included in this description's list of servers.
|
467
|
+
#
|
468
|
+
# @example Check if a server is in the description list of servers.
|
469
|
+
# description.lists_server?(server)
|
470
|
+
#
|
471
|
+
# @return [ true, false ] If a server is in the description's list
|
472
|
+
# of servers.
|
473
|
+
#
|
474
|
+
# @since 2.0.6
|
475
|
+
def lists_server?(server)
|
476
|
+
servers.include?(server.address.to_s)
|
477
|
+
end
|
478
|
+
|
479
|
+
# Does this description correspond to a replica set member.
|
480
|
+
#
|
481
|
+
# @example Check if the description is from a replica set member.
|
482
|
+
# description.replica_set_member?
|
483
|
+
#
|
484
|
+
# @return [ true, false ] If the description is from a replica set
|
485
|
+
# member.
|
486
|
+
#
|
487
|
+
# @since 2.0.6
|
488
|
+
def replica_set_member?
|
489
|
+
!(standalone? || mongos?)
|
490
|
+
end
|
491
|
+
|
492
|
+
# Check equality of two descriptions.
|
493
|
+
#
|
494
|
+
# @example Check description equality.
|
495
|
+
# description == other
|
496
|
+
#
|
497
|
+
# @param [ Object ] other The other description.
|
498
|
+
#
|
499
|
+
# @return [ true, false ] Whether the objects are equal.
|
500
|
+
#
|
501
|
+
# @since 2.0.6
|
502
|
+
def ==(other)
|
503
|
+
return false if self.class != other.class
|
504
|
+
return true if config == other.config
|
505
|
+
!config.keys.empty? && config.keys.all? do |k|
|
506
|
+
config[k] == other.config[k] || EXCLUDE_FOR_COMPARISON.include?(k)
|
507
|
+
end
|
508
|
+
end
|
509
|
+
alias_method :eql?, :==
|
448
510
|
end
|
449
511
|
end
|
450
512
|
end
|
@@ -75,7 +75,8 @@ module Mongo
|
|
75
75
|
private
|
76
76
|
|
77
77
|
def check_driver_support!
|
78
|
-
if DRIVER_WIRE_VERSIONS.max < server_wire_versions.
|
78
|
+
if DRIVER_WIRE_VERSIONS.max < server_wire_versions.min ||
|
79
|
+
DRIVER_WIRE_VERSIONS.min > server_wire_versions.max
|
79
80
|
raise Error::UnsupportedFeatures.new(server_wire_versions)
|
80
81
|
end
|
81
82
|
end
|