Return virtual column (not materialized by the underlying datasource).

@return Result
484128
public function findVirtual()
    {
        $results = [];
        foreach ($this->columns as $name => $column) {
            if ($column->isVirtual()) {
                $results[] = $name;
            }
        }

        return new Result($results, $this->columns);
    }
352373
public function getRelatedColumns()
	{
		//make sure we only run this once and then return the cached version
		if (!sizeof($this->relatedColumns))
		{
			foreach ($this->getColumns() as $column)
			{
				if ($column->getOption('is_related'))
				{
					$this->relatedColumns[$column->getOption('column_name')] = $column->getOption('column_name');
				}
			}
		}

		return $this->relatedColumns;
	}
13915
private function getColumnsToDisplay()
    {
        if (is_array($this->columnsToDisplay)) {
            return $this->columnsToDisplay;
        }

        $columnsToDisplay = [];
        foreach ($this->getColumns() as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */

            if (! $column instanceof Column\Action && $column->isHidden() === false) {
                $columnsToDisplay[] = $column;
            }
        }
        if (empty($columnsToDisplay)) {
            throw new \Exception('No columns to display available');
        }

        $this->columnsToDisplay = $columnsToDisplay;

        return $this->columnsToDisplay;
    }
1057138
private function getColumns()
    {
        $columns = array();
        
        /**
         * Use call_user_func to make sure only public vars are returned
         */
        $vars = call_user_func('get_object_vars', $this);
        
        foreach ( $vars as $key => $value )
        {
            $columns[] = array(
                "name" => $key
            );
        }
        
        return $columns;
    }
1125822
public function fetchColumnAttributes()
    {
        if ( !is_object($this->datasource) )
            return false;

        $conn = $this->datasource->ado_connection;
        //$a = new Reportico($this->datasource);
        //$old_database = $a->database;

        $datadict = false;
        reset($this->columns);
        $lasttab = "";
        while ($d = key($this->columns)) {
            $value = &$this->columns[$d];

            if (array_key_exists($value->query_name, $this->clone_columns)) {
                $value->column_type =
                $this->clone_columns[$value->query_name][0];
                $value->column_length =
                $this->clone_columns[$value->query_name][1];

            } else if ($value->table_name) {
                if ($lasttab != $value->table_name) {
                    $datadict = $this->datasource->ado_connection->MetaColumns($value->table_name);
                    if (!$datadict) {
                        // echo "Data Dictionary Attack Failed Table $value->table_name\n";
                        // echo "Error ".$this->datasource->ado_connection->ErrorMsg()."<br>";
                        //die;
                    }
                }
                foreach ($datadict as $k => $v) {

                    if (strtoupper(trim($k)) == strtoupper($value->column_name)) {
                        //$coldets = $datadict[strtoupper($value->column_name)];
                        $coldets = $datadict[$k];
                        $value->column_type =
                        ReporticoDataSource::mapColumnType(
                            $this->datasource->driver,
                            $datadict[$k]->type);

                        if (strtoupper($value->column_type) == "INTEGER") {
                            $value->column_length = 0;
                        } else if (strtoupper($value->column_type) == "SMALLINT") {
                            $value->column_length = 0;
                        } else {
                            $value->column_length = (int) $datadict[$k]->max_length;
                        }

                        break;
                    }
                }
            }
            $lasttab = $value->table_name;
            next($this->columns);
        }
    }
327955
static function getColumns() {
		$class = get_called_class();
		if (!isset(self::$_qualifiedColumns[$class])) {
			$table = static::getTableName();
			self::$_qualifiedColumns[$class] = array_map(function($column_name) use ($table) {
				return $table . '.' . $column_name;
			}, array_keys(static::$_columns));
		}

		return self::$_qualifiedColumns[$class];
	}
539452
public function getColumns()
    {
        if (null === $this->_cols) {
            $this->_setupMetadata();
            $this->_cols = array_keys($this->_metadata);
        }
        return $this->_cols;
    }
616844
public static function getColumns()
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_columns)) {
            return null;
        }
        return self::$_columns[$cls];
    }
556048
public function getColumns()
    {
        $columns = ArrayList::create();
        
        foreach ($this->getEnabledChildren() as $child) {
            
            $columns->push(
                ArrayData::create([
                    'Child' => $child,
                    'ColumnClass' => $this->ColumnClass
                ])
            );
            
        }
        
        return $columns;
    }
888120
public function getResult()
    {
        if ($this->map->currentModel->row instanceof Sql\DataObjects\Result\Row) {
            $criteria = $this->map->currentModel->row->offsetGet($this->map->currentForeignKey);
            $field = $this->map->referenceTable . '.' . $this->map->referencePrimaryKey;

            if ($result = $this->map->referenceModel->find($criteria, $field, 1)) {
                return $result;
            }
        }

        return false;
    }
828413
protected function getInsertColumnList()
    {
        $columns             = [];
        $versionPropertyName = $this->class->isVersioned()
            ? $this->class->versionProperty->getName()
            : null;

        foreach ($this->class->getDeclaredPropertiesIterator() as $name => $property) {
            /*if (isset($this->class->embeddedClasses[$name])) {
                continue;
            }*/

            switch (true) {
                case $property instanceof VersionFieldMetadata:
                    // Do nothing
                    break;

                case $property instanceof LocalColumnMetadata:
                    if (($property instanceof FieldMetadata
                            && (
                                ! $property->hasValueGenerator()
                                || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY
                            )
                        )
                        || $this->class->identifier[0] !== $name
                    ) {
                        $columnName = $property->getColumnName();

                        $columns[] = $columnName;

                        $this->columns[$columnName] = $property;
                    }

                    break;

                case $property instanceof AssociationMetadata:
                    if ($property->isOwningSide() && $property instanceof ToOneAssociationMetadata) {
                        $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

                        foreach ($property->getJoinColumns() as $joinColumn) {
                            /** @var JoinColumnMetadata $joinColumn */
                            $columnName           = $joinColumn->getColumnName();
                            $referencedColumnName = $joinColumn->getReferencedColumnName();

                            if (! $joinColumn->getType()) {
                                $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                            }

                            $columns[] = $columnName;

                            $this->columns[$columnName] = $joinColumn;
                        }
                    }

                    break;
            }
        }

        return $columns;
    }
736970
public function getInheritanceColumnValue()
    {
        if (!isset($this->_inheritance_column_value)) {
            $classname = $this->getEntityIdentifier()->classname;
            $classes = get_parents($classname, 'AnDomainEntity');
            $classes[] = $classname;
            //remove the first class because it's parent and
            //in STI (single table inheritane) we don't store the
            //orginal enitty class
            array_shift($classes);
            foreach ($classes as $key => $class) {
                if (isset($this->_class_alias[$class])) {
                    $class = ucfirst($this->_class_alias[$class]);
                }
                if (empty($class)) {
                    unset($classes[$key]);
                } else {
                    $classes[$key] = $class;
                }
            }

            //mak sure ther are no repeating classes. This could happen
            //if some of the entities are extending the default
            $classes = array_unique($classes);

            $identifier = clone $this->getEntityIdentifier();
            $identifier->application = null;
            $this->_inheritance_column_value = new AnDomainDescriptionInheritance($classes, $this->_is_abstract ? null : $identifier);
        }

        return $this->_inheritance_column_value;
    }
1350043
protected function getSortableColumns()
    {
        if ($this->sortableColumns !== null) {
            return $this->sortableColumns;
        }

        $columns = $this->getColumns();
        $sortable = array_filter($columns, function ($column) {
            return $column->sortable;
        });

        return $this->sortableColumns = $sortable;
    }
763788
public function getStorageColumns()
    {
        $columns = $this->createStorageColumns();

        $namedColumns = [];

        foreach ($columns as $column) {
            $namedColumns[$column->columnName] = $column;
        }

        return $namedColumns;
    }
412095
protected function rejectVirtualColumns()
    {
        $this->columns = array_filter($this->columns, function ($column) {
            return !isset($column['Extra']) || !Str::contains($column['Extra'], 'VIRTUAL');
        });
    }
499526
public TColumn getPkColumn() {
		TColumn column = null;
		if (hasPkColumn()) {
			column = columns.get(pkIndex);
		}
		return column;
	}
1026172
public function getRemoteShortColumn() {
        $name = $this->getRemoteColumn();
        //Strip out the table name
        if(substr($name, 0, strlen($this->getRemoteTable())) == $this->getRemoteTable() && lcfirst(substr($name, strlen($this->getRemoteTable()))) != 'source') {
            $name = lcfirst(substr($name, strlen($this->getRemoteTable())));
        }
        return $name;
    }