You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: settings.rb
    path of file: ./repos/torque-postgresql/lib/torque/postgresql/auxiliary_statement
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Torque
  module PostgreSQL
    class AuxiliaryStatement
      class Settings < Collector.new(:attributes, :join, :join_type, :q
    
          def sanitize_query(value, command = nil)
            return value if relation_query?(value)
            return value if value.is_a?(::Arel::SelectManager)

            command = value if command.nil? # For compatibility purposes
            valid_type = command.respond_to?(:call) || command.is_a?(String)

            raise ArgumentError, <<-MSG.squish unless valid_type
              Only relation, string and proc are valid object types for query,
              #{command.inspect} given.
            MSG

            command
          end