CreateColumnDefinitionItem extends AbstractCreateDefinitionItem
Syntax tree node for column definitions within a create statements.
Holds basic attributes common to all types of columns.
Table of Contents
Properties
- $allowNull : bool
- Allow NULL values
- $autoIncrement : bool
- Set auto increment flag
- $columnFormat : string
- The column format (DYNAMIC or FIXED)
- $columnName : Identifier
- $comment : string
- Column comment
- $dataType : AbstractDataType
- $defaultValue : mixed
- The explicit default value
- $hasDefaultValue : bool
- Explicit default value
- $index : bool
- Create non-unique index for column
- $primary : bool
- Use column as primary key for table
- $reference : ReferenceDefinition
- $storage : string
- The storage type for the column (ignored unless MySQL Cluster with NDB Engine)
- $unique : bool
- Create unique constraint for column
Methods
- __construct() : mixed
- CreateColumnDefinitionItem constructor.
Properties
$allowNull
Allow NULL values
        public
            bool
    $allowNull
     = true
    
    
    
    
    
$autoIncrement
Set auto increment flag
        public
            bool
    $autoIncrement
     = false
    
    
    
    
    
$columnFormat
The column format (DYNAMIC or FIXED)
        public
            string
    $columnFormat
    
    
    
    
    
    
$columnName
        public
            Identifier
    $columnName
    
    
    
    
    
    
$comment
Column comment
        public
            string
    $comment
    
    
    
    
    
    
$dataType
        public
            AbstractDataType
    $dataType
    
    
    
    
    
    
$defaultValue
The explicit default value
        public
            mixed
    $defaultValue
    
    
    
    
    
    
$hasDefaultValue
Explicit default value
        public
            bool
    $hasDefaultValue
     = false
    
    
    
    
    
$index
Create non-unique index for column
        public
            bool
    $index
     = false
    
    
    
    
    
$primary
Use column as primary key for table
        public
            bool
    $primary
     = false
    
    
    
    
    
$reference
        public
            ReferenceDefinition
    $reference
    
    
    
    
    
    
$storage
The storage type for the column (ignored unless MySQL Cluster with NDB Engine)
        public
            string
    $storage
    
    
    
    
    
    
$unique
Create unique constraint for column
        public
            bool
    $unique
     = false
    
    
    
    
    
Methods
__construct()
CreateColumnDefinitionItem constructor.
    public
                    __construct(Identifier $columnName, AbstractDataType $dataType) : mixed
    Parameters
- $columnName : Identifier
- $dataType : AbstractDataType