Update order_by setting for filter set
504803
def order_by(self, order_by: Union[set, str]):
        """"""
        clone = self._clone()
        if isinstance(order_by, str):
            order_by = {order_by}

        clone._order_by = clone._order_by.union(order_by)

        return clone
1365630
def filtered(self, efilter):
        '''
        
        '''
        if not self.params:
            self.params={'filter' : efilter}
            return self
        if not self.params.has_key('filter'):
            self.params['filter'] = efilter
            return self
        self.params['filter'].update(efilter)
        return self
411818
function updateFilters(column, value) {
      var _this = this;

      if (this.timer) clearTimeout(this.timer);
      this.timer = setTimeout(function () {
        _this.updateFiltersImmediately(column, value);
      }, 400);
    }
1287003
function _getFilterIndex(filterSets, filter) {
        var index = -1;

        if (!filter || !filterSets.length) {
            return index;
        }

        return _.findIndex(filterSets, _.partial(_.isEqual, filter));
    }
93442
def set_filter_raw_should(self, filter_raw_should):
        """"""

        self.filter_raw_should = filter_raw_should

        self.filter_raw_should_dict = []
        splitted = re.compile(FILTER_SEPARATOR).split(filter_raw_should)
        for fltr_raw in splitted:
            fltr = self.__process_filter(fltr_raw)

            self.filter_raw_should_dict.append(fltr)
461165
function update(req, res, next) {
    for (var key in req.body) {
      req.body[key] = utils.toNative(req.body[key])
    }
    var resource = db(req.params.resource)
      .update(utils.toNative(req._internal.filters.id), req.body)
    if (resource) {
      res.jsonp(resource)
    } else {
      res.status(404).jsonp({})
    }
  }
1029413
def filter(self, table, mappings, filter_string):
        """"""
        q = filter_string.lower()
        return [mapping for mapping in mappings
                if q in mapping.ud.lower()]
412815
def update_one(cls, filter, update, upsert=False):
        
        return cls.collection.update_one(filter, update, upsert).raw_result
1372705
def user_order_by(self, field):
    
    # Get ordering model.
    model_label = order.utils.resolve_labels('.'.join(\
            [self.model._meta.app_label, self.model._meta.object_name]))
    orderitem_set = getattr(self.model, \
            order.utils.resolve_order_item_related_set_name(model_label))
    order_model = orderitem_set.related.model

    # Resolve ordering model table name.
    db_table = order_model._meta.db_table

    # Add ordering field as extra queryset fields.
    pk_name = self.model._meta.pk.attname

    # If we have a descending query remove '-' from field name when quering.
    sanitized_field = field.lstrip('-')

    extra_select = {
        sanitized_field: '(SELECT %s from %s WHERE item_id=%s.%s)' % \
                (sanitized_field, db_table, self.model._meta.db_table, pk_name)
    }

    # Use original field name when ordering to allow for descending.
    return self.extra(select=extra_select).all().order_by(field)
65322
private function updateUriQuery(): void
    {
        $sort = [];
        foreach ($this->order as $field => $direction) {
            if ($direction === self::ORDER_ASC) {
                $sort[] = $field;
            } elseif ($direction === self::ORDER_DESC) {
                $sort[] = '-' . $field;
            }
        }

        $fields = [];
        foreach ($this->fields as $type => $fields) {
            $fields[$type] = implode(',', $fields);
        }

        $query = [
            'sort' => implode(',', $sort),
            'pagination' => $this->pagination,
            'filter' => $this->filter,
            'include' => implode(',', $this->includes),
            'fields' => $fields
        ];

        $this->uri = $this->uri()->withQuery(http_build_query($query));
    }
938157
def set_order(self, order):
        
        m = gtk.ListStore(bool, str)
        for item in order:
            m.append(
                (item['reverse'], item['key'])
                )
        # TODO fill with __labels missing in order.
        self.set_model(m)
315761
def order(self, order):
    '''

    '''
    order = order if isinstance(order, Order) else Order(order)

    # ensure order gets attr values the same way the rest of the query does.
    order.object_getattr = self.object_getattr
    self.orders.append(order)
    return self
278637
def update_many(cls, filter, update, upsert=False):
        
        return cls.collection.update_many(filter, update, upsert).raw_result
594781
def update_line(self, resource_id, data):
        """"""
        return OrderLines(self.client).on(self).update(resource_id, data)
1347325
private function setQueryOrder()
    {
        if ($this->hasInput('column_orders'))
        {
            // before we process the order, we need to check if
            // single order is set.
            // and remove other column_orders keys and method except for the single order
            // specified.
            if ($this->hasInput('single_order') && isset($this->columns[$this->getInput('single_order')]))
            {
                // single_order might empty
                $single_order = $this->getInput('single_order');

                if ( ! empty($single_order))
                {
                    foreach ($this->requestParameters['column_orders'] as $key => $value)
                    {
                        if ($key != $single_order)
                        {
                            unset($this->requestParameters['column_orders'][$key]);
                        }
                    }
                }
            }

            // overide default column_orders keys and methods
            $column_orders_input = $this->getInput('column_orders');
            if (!empty($column_orders_input) && is_array($column_orders_input))
            {
                // $input_orders method
                foreach ($column_orders_input as $order_by => $order_method)
                {
                    if (!array_key_exists($order_by, $this->columns))
                    {
                        unset($column_orders_input[$order_by]);
                    }
                    else
                    {
                        if (!is_string($order_method) || !in_array($order_method, array('asc', 'desc')))
                        {
                            $column_orders_input[$order_by] = 'asc';
                        }
                    }
                }

                // override default order
                $this->columnOrders = $column_orders_input;
            }
        }

        // load default column_orders
        // no need to perform validation since
        // tblist assumes that it is a system generated data
        // not user generated data.
        foreach ($this->columnOrders as $column_key => $order_method)
        {
            // just set the default order query string
            // just like: order by column_name desc
            $table_column = $this->getColumnOption($column_key, self::COLUMN_OPTION_TABLE_COLUMN, $column_key);
            $this->query->orderBy($table_column, $order_method);
        }
    }
696541
def filter_queryset(self, request, queryset, view):
        "
        self.ordering_param = view.SORT

        ordering = self.get_ordering(request, queryset, view)
        if ordering:
            return queryset.order_by(*ordering)

        return queryset
740066
function apply_moving_filter(set, filter, n) {
  if (!_.isNumber(n)) { n = 3; }

  for (series in set) { /* For each series */
    /* Apply the filter */
    set[series] = filter(set[series], n);
  }

  return set;
}