Skip to content

Commit 177d9a3

Browse files
RUBY-3085 Remove pre-OP_MSG wire protocols (#2600)
1 parent fe785ae commit 177d9a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+38
-3508
lines changed

lib/mongo/operation.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
require 'mongo/operation/shared/executable_no_validate'
1010
require 'mongo/operation/shared/executable_transaction_label'
1111
require 'mongo/operation/shared/polymorphic_lookup'
12-
require 'mongo/operation/shared/polymorphic_operation'
1312
require 'mongo/operation/shared/polymorphic_result'
1413
require 'mongo/operation/shared/read_preference_supported'
1514
require 'mongo/operation/shared/bypass_document_validation'
@@ -22,8 +21,7 @@
2221
require 'mongo/operation/shared/specifiable'
2322
require 'mongo/operation/shared/validatable'
2423
require 'mongo/operation/shared/object_id_generator'
25-
require 'mongo/operation/shared/op_msg_or_command'
26-
require 'mongo/operation/shared/op_msg_or_find_command'
24+
require 'mongo/operation/shared/op_msg_executable'
2725

2826
require 'mongo/operation/op_msg_base'
2927
require 'mongo/operation/command'

lib/mongo/operation/aggregate.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/aggregate/command'
1918
require 'mongo/operation/aggregate/op_msg'
2019
require 'mongo/operation/aggregate/result'
2120

@@ -33,7 +32,7 @@ module Operation
3332
# @since 2.0.0
3433
class Aggregate
3534
include Specifiable
36-
include OpMsgOrCommand
35+
include OpMsgExecutable
3736
end
3837
end
3938
end

lib/mongo/operation/aggregate/command.rb

Lines changed: 0 additions & 55 deletions
This file was deleted.

lib/mongo/operation/collections_info.rb

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/collections_info/command'
1918
require 'mongo/operation/collections_info/result'
2019

2120
module Mongo
@@ -28,23 +27,12 @@ module Operation
2827
# @since 2.0.0
2928
class CollectionsInfo
3029
include Specifiable
31-
include PolymorphicOperation
32-
include PolymorphicLookup
30+
include OpMsgExecutable
3331

3432
private
3533

36-
def final_operation(connection)
37-
op_class = if connection.features.list_collections_enabled?
38-
if connection.features.op_msg_enabled?
39-
ListCollections::OpMsg
40-
else
41-
ListCollections::Command
42-
end
43-
else
44-
CollectionsInfo::Command
45-
end
46-
47-
op_class.new(spec)
34+
def final_operation
35+
ListCollections::OpMsg.new(spec)
4836
end
4937
end
5038
end

lib/mongo/operation/collections_info/command.rb

Lines changed: 0 additions & 48 deletions
This file was deleted.

lib/mongo/operation/command.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/command/command'
1918
require 'mongo/operation/command/op_msg'
2019

2120
module Mongo
@@ -28,7 +27,7 @@ module Operation
2827
# @since 2.0.0
2928
class Command
3029
include Specifiable
31-
include OpMsgOrCommand
30+
include OpMsgExecutable
3231
end
3332
end
3433
end

lib/mongo/operation/command/command.rb

Lines changed: 0 additions & 41 deletions
This file was deleted.

lib/mongo/operation/count.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/count/command'
1918
require 'mongo/operation/count/op_msg'
2019

2120
module Mongo
@@ -28,7 +27,7 @@ module Operation
2827
# @since 2.0.0
2928
class Count
3029
include Specifiable
31-
include OpMsgOrCommand
30+
include OpMsgExecutable
3231
end
3332
end
3433
end

lib/mongo/operation/count/command.rb

Lines changed: 0 additions & 47 deletions
This file was deleted.

lib/mongo/operation/create.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/create/command'
1918
require 'mongo/operation/create/op_msg'
2019

2120
module Mongo
@@ -28,7 +27,7 @@ module Operation
2827
# @since 2.0.0
2928
class Create
3029
include Specifiable
31-
include OpMsgOrCommand
30+
include OpMsgExecutable
3231
end
3332
end
3433
end

lib/mongo/operation/create/command.rb

Lines changed: 0 additions & 47 deletions
This file was deleted.

lib/mongo/operation/create_index.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require 'mongo/operation/create_index/command'
1918
require 'mongo/operation/create_index/op_msg'
2019

2120
module Mongo
@@ -28,7 +27,7 @@ module Operation
2827
# @since 2.0.0
2928
class CreateIndex
3029
include Specifiable
31-
include OpMsgOrCommand
30+
include OpMsgExecutable
3231
end
3332
end
3433
end

0 commit comments

Comments
 (0)