Gets the SqlServer Column Definition for a Column object.

@param \Phinx\Db\Table\Column $column Column
@return string
776268
protected function getColumnSqlDefinition(Column $column, $create = true)
    {
        $buffer = [];
        if ($column->getType() instanceof Literal) {
            $buffer[] = (string)$column->getType();
        } else {
            $sqlType = $this->getSqlType($column->getType());
            $buffer[] = strtoupper($sqlType['name']);
            // integers cant have limits in SQlServer
            $noLimits = [
                'bigint',
                'int',
                'tinyint'
            ];
            if (!in_array($sqlType['name'], $noLimits) && ($column->getLimit() || isset($sqlType['limit']))) {
                $buffer[] = sprintf('(%s)', $column->getLimit() ? $column->getLimit() : $sqlType['limit']);
            }
        }
        if ($column->getPrecision() && $column->getScale()) {
            $buffer[] = '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
        }

        $properties = $column->getProperties();
        $buffer[] = $column->getType() === 'filestream' ? 'FILESTREAM' : '';
        $buffer[] = isset($properties['rowguidcol']) ? 'ROWGUIDCOL' : '';

        $buffer[] = $column->isNull() ? 'NULL' : 'NOT NULL';

        if ($create === true) {
            if ($column->getDefault() === null && $column->isNull()) {
                $buffer[] = ' DEFAULT NULL';
            } else {
                $buffer[] = $this->getDefaultValueDefinition($column->getDefault());
            }
        }

        if ($column->isIdentity()) {
            $buffer[] = 'IDENTITY(1, 1)';
        }

        return implode(' ', $buffer);
    }
222019
public function lastInsertId(string $table, string $column = 'id')
    {
        $databaseServer = $this->connection->getDatabasePlatform()->getName();
        if (isset($this->databaseSpecificHelpers[$databaseServer])) {
            return $this->databaseSpecificHelpers[$databaseServer]
                ->lastInsertId($table, $column);
        }

        return $this->connection->lastInsertId($table);
    }
267160
protected function getTokenColumn($column)
    {
        if (! array_key_exists($column, $this->tokenColumns)) {
            // This should never happen. If it does, then it means
            // that someone is a moron and has removed required
            // settings from the config files. Better safe than sorry.
            throw new BadRequestHttpException;
        }

        return $this->tokenColumns[$column];
    }
106133
public function getColumnLabel($column, $table)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = $this->_currentModel;
        /** @var Module $module */
        $module = $this->module;
        if (isset($model->attributeLabels()[$column])) {
            return $model->attributeLabels()[$column];
        } elseif ($module->tables[$table]['relations'][$column]['label']) {
            return $module->tables[$table]['relations'][$column]['label'];
        } else {
            return $column;
        }
    }
947840
public function getColumn(string $column)
    {
        return isset($this->columnData[$column]) ? $this->columnData[$column] : null;
    }
469971
protected function addColumnAlias($column)
    {
        $tableAlias = $this->getAlias();
        if (empty($tableAlias)) {
            return $column;
        }

        if (false === strpos($column, '.') &&
            false === strpos($column, '(') &&
            false === strpos($column, 'SELECT')
        ) {
            return $tableAlias.'.'.$column;
        }

        return $column;
    }
1152883
protected function column(Column $column) : ColumnExpr
    {
        return Expr::column($this->relatedTable->getName(), $column);
    }
870310
protected function _DefineColumn($Column) {
      if (!is_array($Column->Type) && !in_array($Column->Type, array('tinyint', 'smallint', 'mediumint', 'int', 'bigint', 'char', 'varchar', 'varbinary', 'date', 'datetime', 'mediumtext', 'longtext', 'text', 'decimal', 'numeric', 'float', 'double', 'enum', 'timestamp', 'tinyblob', 'blob', 'mediumblob', 'longblob')))
         throw new Exception(sprintf(T('The specified data type (%1$s) is not accepted for the MySQL database.'), $Column->Type));
      
      $Return = '`'.$Column->Name.'` '.$Column->Type;
      
      $LengthTypes = $this->Types('length');
      if ($Column->Length != '' && in_array(strtolower($Column->Type), $LengthTypes)) {
         if($Column->Precision != '')
            $Return .= '('.$Column->Length.', '.$Column->Precision.')';
         else
            $Return .= '('.$Column->Length.')';
      }
      if (property_exists($Column, 'Unsigned') && $Column->Unsigned) {
         $Return .= ' unsigned';
      }

      if (is_array($Column->Enum))
         $Return .= "('".implode("','", $Column->Enum)."')";

      if (!$Column->AllowNull)
         $Return .= ' not null';

      if (!(is_null($Column->Default) || $Column->Default === '') && strcasecmp($Column->Type, 'timestamp') != 0)
         $Return .= " default ".self::_QuoteValue($Column->Default);

      if ($Column->AutoIncrement)
         $Return .= ' auto_increment';

      return $Return;
   }
874951
public static function hasColumn($column)
    {
        $cls  = get_called_class();
        $key  = null;
        $keys = self::$_columns[$cls];

        foreach ($keys as $ckey) {
            $col1 = self::isIgnoringCase() ? strtolower($ckey)   : $ckey;
            $col2 = self::isIgnoringCase() ? strtolower($column) : $column;
            if ($col1==$col2) {
                $key = $ckey;
                break;
            }
        }
        return $key;
    }
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;
    }
402384
public function get($column)
    {
        foreach ($this->expressions as $expr) {
            if ($expr->getColumn() == $column) {
                return $expr;
            }
        }

        return null;
    }
1194103
protected function _getFloatColumn(Column\Float $column)
    {
        if (is_null($column->getDecimal())) {
            return sprintf(
                '%s FLOAT(%s)',
                $column->getName(),
                $column->getDigits()
            );
        }

        return sprintf(
            '%s DECIMAL(%s, %s)',
            $column->getName(),
            $column->getDigits(),
            $column->getDecimal()
        );
    }
439164
public function getSortColumn($column)
    {
        $val = null;

        if ($this->isSorted($column)) {
            $def = $this->sortColumns[$this->mappingSortColumns[$column]];

            if (isset($def['sort'])) {
                $val = $def['sort'];
            }
        }

        return $val;
    }
160956
protected function _getColumnKey($column)
    {
        if (!is_array($column)) {
            $matches = $this->_matchColumnString($column);
            $columnKey = $matches[1];
        } elseif (!empty($column['attribute'])) {
            $columnKey = $column['attribute'];
        } elseif (!empty($column['label'])) {
            $columnKey = $column['label'];
        } elseif (!empty($column['header'])) {
            $columnKey = $column['header'];
        } elseif (!empty($column['class'])) {
            $columnKey = $column['class'];
        } else {
            $columnKey = null;
        }
        return hash('crc32', $columnKey);
    }
539165
public function getColumnMeta($column)
	{
		$field = $this->pdo->driver->fetchField($this->resource, $column);
		$field = (array)$field;
		
		return $field;
	}
1303748
public function prefixColumn($column)
    {
        $table_names = $this->tableNames();
        if (count(
                        array_filter($table_names, function ($value) use (&$column) {
                            return strpos($column, $value . '.') === 0;
                        })
                )) {
            // the column starts with one of the table names
            $column = $this->prefix . $column;
        }

        return $column;
    }
81241
protected function getCreateColumnCommentSQLQuery(Column $column, $table)
    {
        return 'COMMENT ON COLUMN '.$table.'.'.$column->getName().' IS '.$this->getColumnCommentSQLDeclaration($column);
    }