Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/mongo/operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
require 'mongo/operation/shared/executable_no_validate'
require 'mongo/operation/shared/executable_transaction_label'
require 'mongo/operation/shared/polymorphic_lookup'
require 'mongo/operation/shared/polymorphic_operation'
require 'mongo/operation/shared/polymorphic_result'
require 'mongo/operation/shared/read_preference_supported'
require 'mongo/operation/shared/bypass_document_validation'
Expand All @@ -22,8 +21,7 @@
require 'mongo/operation/shared/specifiable'
require 'mongo/operation/shared/validatable'
require 'mongo/operation/shared/object_id_generator'
require 'mongo/operation/shared/op_msg_or_command'
require 'mongo/operation/shared/op_msg_or_find_command'
require 'mongo/operation/shared/op_msg_executable'

require 'mongo/operation/op_msg_base'
require 'mongo/operation/command'
Expand Down
3 changes: 1 addition & 2 deletions lib/mongo/operation/aggregate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/aggregate/command'
require 'mongo/operation/aggregate/op_msg'
require 'mongo/operation/aggregate/result'

Expand All @@ -33,7 +32,7 @@ module Operation
# @since 2.0.0
class Aggregate
include Specifiable
include OpMsgOrCommand
include OpMsgExecutable
end
end
end
55 changes: 0 additions & 55 deletions lib/mongo/operation/aggregate/command.rb

This file was deleted.

18 changes: 3 additions & 15 deletions lib/mongo/operation/collections_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/collections_info/command'
require 'mongo/operation/collections_info/result'

module Mongo
Expand All @@ -28,23 +27,12 @@ module Operation
# @since 2.0.0
class CollectionsInfo
include Specifiable
include PolymorphicOperation
include PolymorphicLookup
include OpMsgExecutable

private

def final_operation(connection)
op_class = if connection.features.list_collections_enabled?
if connection.features.op_msg_enabled?
ListCollections::OpMsg
else
ListCollections::Command
end
else
CollectionsInfo::Command
end

op_class.new(spec)
def final_operation
ListCollections::OpMsg.new(spec)
end
end
end
Expand Down
48 changes: 0 additions & 48 deletions lib/mongo/operation/collections_info/command.rb

This file was deleted.

3 changes: 1 addition & 2 deletions lib/mongo/operation/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/command/command'
require 'mongo/operation/command/op_msg'

module Mongo
Expand All @@ -28,7 +27,7 @@ module Operation
# @since 2.0.0
class Command
include Specifiable
include OpMsgOrCommand
include OpMsgExecutable
end
end
end
41 changes: 0 additions & 41 deletions lib/mongo/operation/command/command.rb

This file was deleted.

3 changes: 1 addition & 2 deletions lib/mongo/operation/count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/count/command'
require 'mongo/operation/count/op_msg'

module Mongo
Expand All @@ -28,7 +27,7 @@ module Operation
# @since 2.0.0
class Count
include Specifiable
include OpMsgOrCommand
include OpMsgExecutable
end
end
end
47 changes: 0 additions & 47 deletions lib/mongo/operation/count/command.rb

This file was deleted.

3 changes: 1 addition & 2 deletions lib/mongo/operation/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/create/command'
require 'mongo/operation/create/op_msg'

module Mongo
Expand All @@ -28,7 +27,7 @@ module Operation
# @since 2.0.0
class Create
include Specifiable
include OpMsgOrCommand
include OpMsgExecutable
end
end
end
47 changes: 0 additions & 47 deletions lib/mongo/operation/create/command.rb

This file was deleted.

3 changes: 1 addition & 2 deletions lib/mongo/operation/create_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'mongo/operation/create_index/command'
require 'mongo/operation/create_index/op_msg'

module Mongo
Expand All @@ -28,7 +27,7 @@ module Operation
# @since 2.0.0
class CreateIndex
include Specifiable
include OpMsgOrCommand
include OpMsgExecutable
end
end
end
Loading