# File lib/moped/uri.rb, line 139
    def options
      options_string, options = match[10], { database: database }
      unless options_string.nil?
        options_string.split(/\&/).each do |option_string|
          key, value = option_string.split(/=/)
          if WRITE_OPTIONS.include?(key)
            options[:write] = { key.to_sym => cast(value) }
          elsif read = READ_MAPPINGS[value.downcase]
            options[:read] = read
          else
            options[key.to_sym] = cast(value)
          end
        end
      end
      options
    end