def add_sort_option(options, field, direction)
      if driver == :mongo1x
        sorting = (options[:sort] || []).dup
        sorting.push([ field, direction ])
        options.store(:sort, sorting)
      else
        sorting = (options[:sort] || {}).dup
        sorting[field] = direction
        options.store(:sort, sorting)
      end
    end
def add_sort_option(options, field, direction)
      if driver == :mongo1x
        sorting = (options[:sort] || []).dup
        sorting.push([ field, direction ])
        options.store(:sort, sorting)
      else
        sorting = (options[:sort] || {}).dup
        sorting[field] = direction
        options.store(:sort, sorting)
      end
    end
Add a single sort option.

 @api private

 @example Add a single sort option.
   optional.add_sort_option({}, :name, 1)

 @param [ Hash ] options The options.
 @param [ String ] field The field name.
 @param [ Integer ] direction The sort direction.

 @return [ Optional ] The cloned optional.

 @since 1.0.0