def distinct(key)
      result = collection.database.command(
        distinct: collection.name,
        key: key.to_s,
        query: selector
      )
      result["values"]
    end
def distinct(key)
      result = collection.database.command(
        distinct: collection.name,
        key: key.to_s,
        query: selector
      )
      result["values"]
    end
Get the distinct values in the collection for the provided key.

 @example Get the distinct values.
   db[:people].find.distinct(:name)

 @param [ Symbol, String ] key The name of the field.

 @return [ Array<Object ] The distinct values.

 @since 1.0.0