public function getColumns($table)
{
$columns = [];
foreach ($this->connection->query('SHOW FULL COLUMNS FROM ' . $this->delimite($table)) as $row) {
$type = explode('(', $row['Type']);
$columns[] = ['name' => $row['Field'], 'table' => $table, 'nativetype' => strtoupper($type[0]), 'size' => isset($type[1]) ? (int) $type[1] : NULL, 'unsigned' => (bool) strstr($row['Type'], 'unsigned'), 'nullable' => $row['Null'] === 'YES', 'default' => $row['Default'], 'autoincrement' => $row['Extra'] === 'auto_increment', 'primary' => $row['Key'] === 'PRI', 'vendor' => (array) $row];
}
return $columns;
}