[DBIx-Class-Devel] [dbsrgits/sql-translator] MySQL Parser understands VIEWs with a field list. (#87)
Adam Herzog
notifications at github.com
Mon Apr 10 15:40:23 GMT 2017
adherzog commented on this pull request.
> @@ -502,6 +502,19 @@ BEGIN {
is( join(',', $t2c2->reference_fields), 'id', 'To field "id"' );
}
+# Tests for CREATE VIEW statements that contain a column list
+# after the view name
+{
+ my $tr = SQL::Translator->new();
+ my $data = parse($tr,
+ q[
+ CREATE
+ VIEW view_foo (id, name) AS
+ SELECT id, name FROM thing;
+ ]
+ ) or die $tr->error;
I've added better tests - it now checks VIEW statements that include 1) a field list, 2) aliases in the SELECT statement, and 3) both a field list and aliases. (When both are specified, I believe the field list should override the column aliases.)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/87#discussion_r110690158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20170410/41d5d11e/attachment.htm>
More information about the DBIx-Class-Devel
mailing list