Get a column's test case instance.

@param $column
@return \EGALL\EloquentPHPUnit\Database\TableColumnTestCase
512297
protected function tableColumn($column)
    {
        if (is_null($this->table)) {
            $this->setTable();
        }

        return new Column($this->context, $this->table, $column);
    }
828132
public function orderDesc(string $column)
    {
        $instance = $this->orderByStrategyInstance();

        $instance->orderByStrategy()->orderDesc($column);

        return $instance;
    }
325960
public function havingIsNotNull(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->havingIsNotNull($column);

        return $instance;
    }
399265
public function addColumn(Column $column)
    {
        $this->columns[] = $column;

        if ($column instanceof ColumnInterface) {
            $column->initialize($this);
        }

        return $this;
    }
1241878
public function getColumnMeta($column)
    {
        try {
            return $this->_stmt->getColumnMeta($column);
        } catch (PDOException $e) {
            // require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
185109
public function selectFrom($table, string $column, string ...$columns)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->columnsFrom($table, $column, ...$columns);

        return $instance;
    }
407775
protected function getFieldByColumn($column)
    {
        return $this->builder->fields()->first(
            function (Field $field) use ($column) {
                if (is_array($field->column())) {
                    return in_array($column, $field->column(), true);
                }

                return $field->column() === $column;
            }
        );
    }
913989
public function getValidator(Column $column)
    {
        $key = $column->getName();
        if (!isset($this->validators[$key])) {
            $this->validators[$key] = new Validator();
            $this->validators[$key]->setColumn($column);
        }

        return $this->validators[$key];
    }
872940
public function getColumnMeta($column)
    {
        $fields = sqlsrv_field_metadata($this->_stmt);

        if (!$fields) {
            throw new Zend_Db_Statement_Sqlsrv_Exception('Column metadata can not be fetched');
        }

        if (!isset($fields[$column])) {
            throw new Zend_Db_Statement_Sqlsrv_Exception('Column index does not exist in statement');
        }

        return $fields[$column];
    }
1342876
public function foreignKey(string $column): AbstractForeignKey
    {
        if (!$this->hasColumn($column)) {
            throw new SchemaException("Undefined column '{$column}' in '{$this->getName()}'");
        }

        if ($this->hasForeignKey($column)) {
            return $this->current->findForeignKey($column);
        }

        if ($this->initial->hasForeignKey($column)) {
            //Let's ensure that FK name is always stays synced (not regenerated)
            $name = $this->initial->findForeignKey($column)->getName();
        } else {
            $name = $this->createIdentifier('foreign', [$column]);
        }

        $foreign = $this->createForeign($name)->column($column);

        //Adding to current schema
        $this->current->registerForeignKey($foreign);

        //Let's ensure index existence to performance and compatibility reasons
        $this->index([$column]);

        return $foreign;
    }
1114042
public function get($column): Column
    {
        if (!$this->exists($column)) {
            throw new Exception\ColumnNotFoundException(__METHOD__ . " Column '$column' not present in column model.");
        }

        return $this->columns->offsetGet($column);
    }
172112
public function orHavingIsNull(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->orHavingIsNull($column);

        return $instance;
    }
947840
public function getColumn(string $column)
    {
        return isset($this->columnData[$column]) ? $this->columnData[$column] : null;
    }
369846
public function getColumn($column) {
		if ($this->columns->has($column)) {
			return $this->columns[$column];
		}

		throw new ColumnException('Column not found!');
	}
1136109
protected function prepareDefaultValue(Column $column)
    {
        $typeMapper = $this->getDataType();

        $default = $column->getDefault();

        if (!$column->getAllowNull() && $default === null && !$column->isPrimary()) {
            $default = $typeMapper::getDefaultValue($column->getType());

            $column->defaultValue($default);
        }

        return $column;
    }
343317
public function whereIsNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIsNull($column);

        return $instance;
    }
194813
public static function all($column='')
    {
        $instance = new static;

        $result = $instance->newRequest($instance->functionCall,$instance->module);

        $collection = $instance->newCollection();
        foreach($result as $key => $object){
            $collection->put($key, new static((array) $object));
        }
        return $collection;
    }