lib/mongo/crypt/encryption_io.rb
def mark_command(cmd)
        unless @mongocryptd_client
          raise ArgumentError, 'mark_command requires mongocryptd_client to have been passed to the constructor, but it was not'
        end

        # Ensure the response from mongocryptd is deserialized with { mode: :bson }
        # to prevent losing type information in commands
        options = { execution_options: { deserialize_as_bson: true } }

        begin
          response = @mongocryptd_client.database.command(cmd, options)
        rescue Error::NoServerAvailable => e
          raise e if @options[:mongocryptd_bypass_spawn]

          spawn_mongocryptd
          response = @mongocryptd_client.database.command(cmd, options)
        end

        return response.first
      end
# Send the command to mongocryptd to be marked with intent-to-encrypt markings
#
# @param [ Hash ] cmd
#
# @return [ Hash ] The marked command
Send the command to mongocryptd to be marked with intent-to-encrypt markings
Send the command to mongocryptd to be marked with intent - to - encrypt markings
def mark_command(cmd)
        unless @mongocryptd_client
          raise ArgumentError, 'mark_command requires mongocryptd_client to have been passed to the constructor, but it was not'
        end
        options = { execution_options: { deserialize_as_bson: true } }
        begin
          response = @mongocryptd_client.database.command(cmd, options)
        rescue Error::NoServerAvailable => e
          raise e if @options[:mongocryptd_bypass_spawn]
          spawn_mongocryptd
          response = @mongocryptd_client.database.command(cmd, options)
        end
        return response.first
      end
def mark_command ( cmd ) unless @mongocryptd_client raise ArgumentError , 'mark_command requires mongocryptd_client to have been passed to the constructor, but it was not' end options = { execution_options : { deserialize_as_bson : true } } begin response = @mongocryptd_client . database . command ( cmd , options ) rescue Error :: NoServerAvailable => e raise e if @options [ :mongocryptd_bypass_spawn ] spawn_mongocryptd response = @mongocryptd_client . database . command ( cmd , options ) end return response . first end
Send the command to mongocryptd to be marked with intent-to-encrypt markings
Send the command to mongocryptd to be marked with intent - to - encrypt markings
# Ensure the response from mongocryptd is deserialized with { mode: :bson } # to prevent losing type information in commands
The marked command
The marked command
 Hash 
cmd
None