public function describeColumns($conn, $table, $schema = null)
    {
        $dialect = $this->getDialect($conn);
        if (method_exists($dialect, 'showFullColumns')) {
            $sql = $this->getDialect($conn)->showFullColumns($table, $schema);
            $comments = [];
            foreach ($conn->fetchAll($sql, Db::FETCH_ASSOC) as $row) {
                $comments[$row['Field']] = $row['Comment'];
            }
            $columns = [];
            foreach ($conn->describeColumns($table, $schema) as $col) {
                $column = Column::copy($col);
                if (!empty($comments[$col->getName()])) {
                    $column->setComment($comments[$col->getName()]);
                }
                $columns[] = $column;
            }
            return $columns;
        } else {
            return $conn->describeColumns($table, $schema);
        }
    }
public function describeColumns($conn, $table, $schema = null)
    {
        $dialect = $this->getDialect($conn);
        if (method_exists($dialect, 'showFullColumns')) {
            $sql = $this->getDialect($conn)->showFullColumns($table, $schema);
            $comments = [];
            foreach ($conn->fetchAll($sql, Db::FETCH_ASSOC) as $row) {
                $comments[$row['Field']] = $row['Comment'];
            }
            $columns = [];
            foreach ($conn->describeColumns($table, $schema) as $col) {
                $column = Column::copy($col);
                if (!empty($comments[$col->getName()])) {
                    $column->setComment($comments[$col->getName()]);
                }
                $columns[] = $column;
            }
            return $columns;
        } else {
            return $conn->describeColumns($table, $schema);
        }
    }
public function describeColumns ( $ conn , $ table , $ schema = null ) { $ dialect = $ this -> getDialect ( $ conn ) ; if ( method_exists ( $ dialect , 'showFullColumns' ) ) { $ sql = $ this -> getDialect ( $ conn ) -> showFullColumns ( $ table , $ schema ) ; $ comments = [ ] ; foreach ( $ conn -> fetchAll ( $ sql , Db :: FETCH_ASSOC ) as $ row ) { $ comments [ $ row [ 'Field' ] ] = $ row [ 'Comment' ] ; } $ columns = [ ] ; foreach ( $ conn -> describeColumns ( $ table , $ schema ) as $ col ) { $ column = Column :: copy ( $ col ) ; if ( ! empty ( $ comments [ $ col -> getName ( ) ] ) ) { $ column -> setComment ( $ comments [ $ col -> getName ( ) ] ) ; } $ columns [ ] = $ column ; } return $ columns ; } else { return $ conn -> describeColumns ( $ table , $ schema ) ; } }
Adds comment to column

@param DbAdapter $conn
@param string $table
@param string $schema
@return Column[]
Adds comment to column