Updates a single column and increments it with selected value. Returns number of affected rows.
@param string $column
@param int $value
@return int
434533
public function increment($column, $value)
    {
        $this->params[':column'] = $value;
        $query = "UPDATE `{$this->table}` {$this->join} SET `$column` = `$column` + :$column";
        if ($this->condition) {
            $query .= " WHERE {$this->condition}";
        }
        if ($this->limit) {
            $query .= " LIMIT {$this->limit}";
        }

        return $this->connection->execQuery($query, $this->params);
    }
764377
public function getAutoIncrementValue(string $table, string $column = 'id')
    {
        $query = $this->connection->createQueryBuilder();
        $query->select($this->connection->getDatabasePlatform()->getMaxExpression($column) . ' AS id')
            ->from($table);

        $data = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return (int) ($data[0]['id'] ?? 0) + 1;
    }
135930
public function sum(string $column = null): int
    {
        if (!is_null($column)) {
            return $this->column($column)->sum();
        }

        return array_sum($this->toArray());
    }
106925
function set( $row, $col, $value )
    {
        if ( $value !== 0 )
        {
            $pos = $row * $this->Cols + $col;
            $pos = base_convert( $pos, 10, 36 );
            $this->Matrix["*$pos"] = $value;
        }
    }
745249
public function postField($column, $value = null)
    {
        // If the column is an array, we will assume it is an array of key-value pairs
        // and can add them each as a post field.
        if (is_array($column)) {
            return $this->postFieldNested(function ($query) use ($column) {
                foreach ($column as $key => $value) {
                    $query->postField($key, $value);
                }
            });
        }

        $this->body[] = compact('column', 'value');

        return $this;
    }
298217
public function setDefault($column, $value)
    {
        $defaults = $this->getDefaults();

        if(isset($defaults[$column])) {
            $this->_defaults[$column] = $value;
        }

        return $this;
    }
30892
public function lt($column, $value = null)
    {
        return $this->where($column, $value, Cmp::LT);
    }
1216818
protected function incrementOrDecrement(string $sign, $columns, $value)
    {
        if (!is_array($columns)) {
            $columns = [$columns];
        }

        $values = [];

        foreach ($columns as $k => $v) {
            if (is_numeric($k)) {
                $values[$v] = function (Expression $expr) use ($sign, $v, $value) {
                    $expr->column($v)->{$sign}->value($value);
                };
            } else {
                $values[$k] = function (Expression $expr) use ($sign, $k, $v) {
                    $expr->column($k)->{$sign}->value($v);
                };
            }
        }

        return $this->set($values);
    }
30604
public function withPivotValue($column, $value = null)
    {
        if (is_array($column)) {
            foreach ($column as $name => $value) {
                $this->withPivotValue($name, $value);
            }

            return $this;
        }

        if (is_null($value)) {
            throw new InvalidArgumentException('The provided value may not be null.');
        }

        $this->pivotValues[] = compact('column', 'value');

        return $this->wherePivot($column, '=', $value);
    }
774212
public function increaseBy($key, $value) {
		$valueOld = $this->get($key, 0);
		if (is_numeric($value) && is_numeric($valueOld)) {
			$this->add($key, $value + $valueOld);
			return $value + $valueOld;
		}
	}
893136
public function findSoft($column, $value)
    {
        return $this->getFirstSoft((is_null($column) ? $this->key : $column) . ' = ?', [$value]);
    }
474677
public function increment($key, $value = 1)
    {
        if ($this->exists($key)) {
            return self::$redis->incrBy($key, $value);
        } else {
            $this->set($key, $value);

            return $value;
        }
    }
543722
public function push($column, $value = null, $unique = false)
    {
        $operation = $unique ? 'merge' : 'append';

        $this->compileWheres();
        $result = $this->query->update([
            $column => r\row($column)->{$operation}($value),
        ])->run();

        return 0 == (int) $result['errors'];
    }
707084
public function setSerialized($column, $value)
  {
    unset($this->serialized[$column]);

    return $this->set($column, !empty($value) ? serialize($value) : null);
  }
748433
public function updateColumn($columnId, $key, $value)
    {
        if (isset($this->_columns[$columnId]) && $this->_columns[$columnId] instanceof Varien_Object) {
            $this->_columns[$columnId]->setData($key, $value);
        }

        return $this;
    }
660754
public function where($column, $value = null)
    {
        // If the column is an array, we will assume it is an array of key-value pairs
        // and can add them each as a where clause.
        if (is_array($column)) {
            return $this->whereNested(function ($query) use ($column) {
                foreach ($column as $key => $value) {
                    $query->where($key, $value);
                }
            });
        }

        $this->wheres[] = compact('column', 'value');

        return $this;
    }
628890
public function set($column, $value)
    {
        $column = $this->completeExpression(new Expr\Column($column));
        $value = $this->completeExpression(new Expr\Parameter($value));
        
        $this->set->set($column->hashCode(), $value);
        
        return $this;
    }