|
@@ 190-194 (lines=5) @@
|
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
// check if a column alias was used (column_name as field_name) |
| 190 |
|
if (preg_match("/(\w+)\sas\s(\w+)/i", $column['name'], $matches)) { |
| 191 |
|
$name = $matches[1]; |
| 192 |
|
$column['name'] = $name; |
| 193 |
|
$column['alias'] = $matches[2]; |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
if (preg_match("/([a-zA-Z]+)\(([0-9]+)\)/", $column['type'], $matches)) { |
| 197 |
|
$column['type'] = $matches[1]; |
|
@@ 196-199 (lines=4) @@
|
| 193 |
|
$column['alias'] = $matches[2]; |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
if (preg_match("/([a-zA-Z]+)\(([0-9]+)\)/", $column['type'], $matches)) { |
| 197 |
|
$column['type'] = $matches[1]; |
| 198 |
|
$column['length'] = $matches[2]; |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
$column['type'] = strtolower($column['type']); |
| 202 |
|
// check if legacy column type (1.x) needs to be mapped to a 2.0 one |