Jump to conversation
Unresolved conversations (3)
@ilmari ilmari Apr 10, 2017
First of all, never use `map` in void context for side effects, use `for` instead. Secondly, this all could be simplified to: ```perl my @fields = @{$item{'parens_field_list(?)'} || []}; $select_sql->{columns}->[$_]->{alias} = $fields[$_] for 0..$#fields; ```
Outdated
lib/SQL/Translator/Parser/MySQL.pm
adherzog ilmari
@ilmari ilmari Apr 3, 2017
Please also test that the view is in fact correctly parsed and that the column names after the view name take precedence over the ones in the `SELECT` list.
t/02mysql-parser.t
adherzog
@ilmari ilmari Apr 3, 2017
An explicit field list overrides the names derived from the `SELECT` column list, so the field list needs to be saved here and stored in the `fields` attribute of the `SQL::Translator::Schema::View` object.
lib/SQL/Translator/Parser/MySQL.pm
adherzog ilmari
Resolved conversations (0)