Sha256: 2e29c6ea47996ef245756a340a9f9cad1ca6c133f568bb944ece72c4e5e85914
Contents?: true
Size: 1.37 KB
Versions: 16
Compression:
Stored size: 1.37 KB
Contents
# frozen_string_literal: true # encoding: utf-8 # Copyright (C) 2015-2020 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 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 module Operation # A MongoDB operation to get info on all collections in a given database. # # @api private # # @since 2.0.0 class CollectionsInfo include Specifiable include PolymorphicOperation include PolymorphicLookup 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) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems