def fix_options(passed_options)
      return passed_options unless passed_options.nil? || passed_options.is_a?(Hash)
      sequelizer_options = db_config.merge(OptionsHash.new(passed_options || {}).to_hash)

      if sequelizer_options[:adapter] =~ /^postgres/
        sequelizer_options[:adapter] = 'postgres'
        paths = %w(search_path schema_search_path schema).map { |key| sequelizer_options.delete(key) }.compact

        unless paths.empty?
          sequelizer_options[:search_path] = paths.first
          sequelizer_options[:after_connect] = after_connect(paths.first)
        end
      end

      if sequelizer_options[:timeout]
        # I'm doing a merge! here because the indifferent access part
        # of OptionsHash seemed to not work when I tried
        # sequelizer_options[:timeout] = sequelizer_options[:timeout].to_i
        sequelizer_options.merge!(timeout: sequelizer_options[:timeout].to_i)
      end

      sequelizer_options.merge(after_connect: make_ac(sequelizer_options))
    end
def fix_options(passed_options)
      return passed_options unless passed_options.nil? || passed_options.is_a?(Hash)
      sequelizer_options = db_config.merge(OptionsHash.new(passed_options || {}).to_hash)

      if sequelizer_options[:adapter] =~ /^postgres/
        sequelizer_options[:adapter] = 'postgres'
        paths = %w(search_path schema_search_path schema).map { |key| sequelizer_options.delete(key) }.compact

        unless paths.empty?
          sequelizer_options[:search_path] = paths.first
          sequelizer_options[:after_connect] = after_connect(paths.first)
        end
      end

      if sequelizer_options[:timeout]
        # I'm doing a merge! here because the indifferent access part
        # of OptionsHash seemed to not work when I tried
        # sequelizer_options[:timeout] = sequelizer_options[:timeout].to_i
        sequelizer_options.merge!(timeout: sequelizer_options[:timeout].to_i)
      end

      sequelizer_options.merge(after_connect: make_ac(sequelizer_options))
    end
If passed a hash, scans hash for certain options and sets up hash
 to be fed to Sequel.connect

 If fed anything, like a string that represents the URL for a DB,
 the string is returned without modification