Re-counts a column

@param string $table
@param string $column
@param string $operator
@param integer $step
@return \Krystal\Db\Sql\QueryBuilder
553135
private function recountColumn($table, $column, $operator, $step = 1)
    {
        // Make sure expected value is going to be updated
        $step = (int) $step;
        $step = (string) $step;

        return $this->update($table, array($column => $column . sprintf(' %s ', $operator) . $step));
    }
28215
private function sql_handle_col( $col, $table ) {
		global $wpdb;

		$table_sql = $this->esc_sql_ident( $table );
		$col_sql   = $this->esc_sql_ident( $col );

		$count = $wpdb->query( $wpdb->prepare( "UPDATE $table_sql SET $col_sql = REPLACE($col_sql, %s, %s);", $this->old, $this->new ) );

		return $count;
	}
185501
public function compare($column, $operator, $value, $filter = false)
    {
        if (!$this->isFilterable($filter, $value)) {
            return $this;
        }

        if ($value instanceof RawSqlFragmentInterface) {
            $value = $value->getFragment();
        }

        if ($value instanceof RawBindingInterface) {
            $value = $value->getTarget();
        }

        $this->append(sprintf(' %s %s %s ', $this->quote($column), $operator, $value));
        return $this;
    }
303335
private function handleMultiTap($item, $column, $value, $operator, $inverse)
    {
        list($objectToSearch, $columnToSearch) = $this->tapThroughObjects($column, $item);

        if ($objectToSearch instanceof self) {
            foreach ($objectToSearch as $subObject) {
                // The column has a tap that ends in a collection.
                return $this->whereObject($subObject, $columnToSearch, $operator, $value, $inverse);
            }
        } else {
            // The column has a tap that ends in direct access
            return $this->whereObject($objectToSearch, $columnToSearch, $operator, $value, $inverse);
        }
    }
116869
public static function alterColumn($operation, $table, $column, $type = null, $notNull = false, $default = null)
    {
        $query = static::getQuery();

        $column = $query->quoteName((array) $column);

        return static::build(
            'ALTER TABLE',
            $query->quoteName($table),
            $operation,
            implode(' TO ', $column),
            $type,
            $notNull ? 'NOT NULL' : null,
            !is_null($default) ? 'SET DEFAULT ' . $query->quote($default) : null
        );
    }
817710
public function on($column1, $column2 = null, $operator = '=')
    {
        return $this->addJoinCondition($column1, $column2, $operator);
    }
1174388
public function down(Table $table, $id, $step = 1)
    {
        return $this->_move($table, $id, $step, self::TYPE_DOWN);
    }
1229768
final public function incrementColumnByPk($pk, $column, $step = 1, $table = null)
    {
        return $this->db->increment($this->getTable($table), $column, $step)
                        ->whereEquals($this->getPk(), $pk)
                        ->execute();
    }
660719
public function where($column, $operator, $value = null)
    {
        if (is_null($value)) {
            if (is_callable($operator)) {
                $this->where[] = [$column, 'func', $operator];
            } else {
                $this->where[] = [$column, '=', $operator];
            }
        } else {
            $this->where[] = [$column, $operator, $value];
        }

        return $this;
    }
1337550
public function orWhere($column, $operator, $value = null)
    {
        $this->orWheres[] = new Where($column, $operator, $value, 'OR');

        return $this;
    }
618927
private function prepareRowLogic(array &$columns, ?string &$operator, array &$values)
    {
        $values = array_values($values);

        foreach ($values as $key => &$value) {
            $value = $this->prepareRow($value);

            $operator = $this->prepareRowOperator($operator, $value, $key);

            if ($operator === 'IN' and count($value) !== count($columns)) {
                throw new SqlException('Wrong row value count in condition on key #' . $key . '.');
            }
        }
        unset($value);

        return $this;
    }
1174915
public function join($table, $column = null, $operator = null, $value = null) {
        $this->q->apd(' INNER JOIN ' . $table);

        if (!empty($column) || !empty($operator) || !empty($value)) {
            if (in_array($operator, $this->operators)) {
                $this->q->apd(' ON ' . $column . $operator . ' ' .  $value);
            } else {
                $value = '=';
                $this->q->apd(' ON ' . $column . ' ' . $value . ' ' . $operator);
            }

            return $this;
        } else {
            return $this;
        }
    }
51309
public function orWhereTime($column, $operator, $value = null)
    {
        $this->wConditions()->orTime(...func_get_args());

        return $this;
    }
509440
public function count(string $column = '*', string $alias = 'count'): ResultInterface
    {
        $this->aggregate['count'] = [$column, $alias];
        $this->addAggregateDecorator($alias);

        return $this->execute();
    }
657122
public function count($columns = '*')
    {
        $result = $this->getBuilder()->count($columns);

        // Reset query builder
        $this->resetBuilder();

        return (int) $result;
    }
625516
public function whereRelation($column1, $operator, $column2 = null)
    {
        $this->wConditions()->relation(...func_get_args());

        return $this;
    }
267884
public static function where($column, $operator, $value = null)
    {
        list($operator, $value) = static::prepareOperatorAndValue(
            $operator, $value, func_num_args() === 2
        );

        return new ValueConstraint($column, $operator, $value);
    }