src/Phossa/Query/Clause/ColDefinitionTrait.php
protected function buildCol()/*# : array */
    {
        $result = [];

        foreach ($this->col_defs as $col) {
            $res = [];
            // name
            $res[] = $this->quote($col['name']);

            // type
            $res[] = $col['type'];

            // not null ?
            if (isset($col['notNull'])) {
                $res[] = 'NOT NULL' .
                    ($col['notNull'] ? (' '.$col['notNull']) : '');
            }

            // default ?
            if (isset($col['default'])) {
                $res[] = 'DEFAULT ' . ($col['default'][1] ? $col['default'][0] :
                    $this->processValue($col['default'][0]));
            }

            // auto
            if (isset($col['autoincrement'])) {
                $res[] = 'AUTO_INCREMENT';
            }

            // unique
            if (isset($col['unique'])) {
                $res[] = 'UNIQUE' .
                    ($col['unique'] ? (' ' . $col['unique']) : '');
            }

            // primary
            if (isset($col['primary'])) {
                $res[] = 'PRIMARY KEY' .
                    ($col['primary'] ? (' ' . $col['primary']) : '');
            }

            // other constraints
            if (isset($col['constraint'])) {
                $res[] = join(' ', $col['constraint']);
            }

            array_walk($res, function($m) { return trim($m); });
            $result[] = join(' ', $res);
        }
        return $result;
    }
protected function buildCol()/*# : array */
    {
        $result = [];

        foreach ($this->col_defs as $col) {
            $res = [];
            // name
            $res[] = $this->quote($col['name']);

            // type
            $res[] = $col['type'];

            // not null ?
            if (isset($col['notNull'])) {
                $res[] = 'NOT NULL' .
                    ($col['notNull'] ? (' '.$col['notNull']) : '');
            }

            // default ?
            if (isset($col['default'])) {
                $res[] = 'DEFAULT ' . ($col['default'][1] ? $col['default'][0] :
                    $this->processValue($col['default'][0]));
            }

            // auto
            if (isset($col['autoincrement'])) {
                $res[] = 'AUTO_INCREMENT';
            }

            // unique
            if (isset($col['unique'])) {
                $res[] = 'UNIQUE' .
                    ($col['unique'] ? (' ' . $col['unique']) : '');
            }

            // primary
            if (isset($col['primary'])) {
                $res[] = 'PRIMARY KEY' .
                    ($col['primary'] ? (' ' . $col['primary']) : '');
            }

            // other constraints
            if (isset($col['constraint'])) {
                $res[] = join(' ', $col['constraint']);
            }

            array_walk($res, function($m) { return trim($m); });
            $result[] = join(' ', $res);
        }
        return $result;
    }
Build column definitions

@return array
@access protected