Aliases an existing where column.

@param string $column
@param string $tableAlias
@param string $pivotAlias
@param string $pivot

@return string
181865
public function aliasRelationshipWhere($column, $tableAlias, $pivotAlias, $pivot)
    {
        //first explode the string on "." in case it was given with the table already included
        $split = explode('.', $column);

        //if the second split item exists, there was a "."
        if (isset($split[1])) {
            //if the table name is the pivot table, append the pivot alias
            if ($split[0] === $pivot) {
                return $pivotAlias.'.'.$split[1];
            }
            //otherwise append the table alias
            else {
                return $tableAlias.'.'.$split[1];
            }
        } else {
            return $tableAlias.'.'.$column;
        }
    }
1124726
private String getIndirectionTableColName(TableAlias mnAlias, String path)
    {
        int dotIdx = path.lastIndexOf(".");
        String column = path.substring(dotIdx);
        return mnAlias.alias + column;
    }
1192455
def _get_aliased_pivot_columns(self):
        
        defaults = [self._foreign_key, self._other_key]

        columns = []

        for column in defaults + self._pivot_columns:
            value = '%s.%s AS pivot_%s' % (self._table, column, column)
            if value not in columns:
                columns.append('%s.%s AS pivot_%s' % (self._table, column, column))

        return columns
553923
public function round($column, $decimals, $alias = null)
    {
        $this->queryBuilder->round($column, $decimals, $alias);
        return $this;
    }
416592
public static function select(string $table = null, string $tableAlias = null): Query\Select
    {
        return static::getAdapter()->select($table, $tableAlias);
    }
1268047
public function select(string $table = null, string $tableAlias = null): Query\Select
    {
        $select = new Query\Select($table, $tableAlias);
        $select->setAdapter($this->getConfigKey());
        return $select;
    }
196446
public static function count(string $column, string $as = null, string $tableAlias = null): self
    {
        return new self(Aggregation\Type::COUNT, $column, $as, $tableAlias);
    }
342271
public function getSQLTableAlias($tableName, $dqlAlias = '')
    {
        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';

        if ( ! isset($this->tableAliasMap[$tableName])) {
            $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't')
                . $this->tableAliasCounter++ . '_';
        }

        return $this->tableAliasMap[$tableName];
    }
525317
private static function cutAlias(string &$column): string
    {
        $aliasAndColumn = explode('.', $column);
        if (count($aliasAndColumn) === 2) {
            $alias  = $aliasAndColumn[0];
            $column = $aliasAndColumn[1];
        } else {
            $alias  = 't';
            $column = $aliasAndColumn[0];
        }

        return $alias;
    }
424707
public function bindColumns(PdoStatement $stmt, array $columnAliases) {
		foreach ($columnAliases as $key => $columnAlias) {
			$this->values[$key] = null;
			$stmt->shareBindColumn($columnAlias, $this->values[$key]);
		}
	}
1101789
public function selectSum(string $column, string $alias = null)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->sum($column, $alias);

        return $instance;
    }
1060784
private TableAlias getTableAliasForPath(String aPath, String aUserAlias, List hintClasses)
    {
        if (aUserAlias == null)
        {
            return getTableAliasForPath(aPath, hintClasses);
        }
        else
        {
			return getTableAliasForPath(aUserAlias + ALIAS_SEPARATOR + aPath, hintClasses);
        }
    }
1318800
protected function loadExpressionWithNecessarySubselects(Select $select, string $tableAlias, callable $expressionCallback) : Expr
    {
        $separateTableRelations = $this->getSeperateTableRelations();

        if ($separateTableRelations) {
            return $this->getExpressionByJoiningRelations($select, $tableAlias, $separateTableRelations, $expressionCallback);
        } else {
            return $expressionCallback($select, $tableAlias);
        }
    }
750772
protected function aliasedPivotColumns()
    {
        $defaults = [$this->foreignPivotKey, $this->relatedPivotKey];

        return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
            return $this->table.'.'.$column.' as pivot_'.$column;
        })->unique()->all();
    }
1162803
public function lcase($column, string $alias = null): self
    {
        return $this->column((new Expression())->lcase($column), $alias);
    }
475682
public static function alias(array $tokens) {
        $column     = self::column($tokens, new MetaData());
        $tableAlias = Table::alias($tokens);

        return empty($tableAlias) ? $column : $tableAlias . '.' . $column;
    }
564782
private function remapColumns(array &$columns, $alias = true): void {
    foreach($columns as &$column) {
      if($this->to_db[$column] !== $column) {
        if($alias) {
          $column = $this->to_db[$column] . ' as ' . $column;
        } else {
          $column = $this->to_db[$column];
        }
      }
    }
  }