[DBIx-Class-Devel] [dbsrgits/sql-translator] MySQL Parser understands VIEWs with a field list. (#87)

Adam Herzog notifications at github.com
Sun Apr 2 20:17:47 GMT 2017


Updates the MySQL parser to properly parse CREATE VIEW statements that
contain a field list after the view name. This allows the parser
to understand statements created by the MySQL producer.

Prior to this change, this statement would be parsed properly:

    CREATE
      VIEW view_foo AS
        SELECT id, name FROM thing;

But this one would not:

    CREATE
      VIEW view_foo (id, name) AS
        SELECT id, name FROM thing;

(The latter statement is the same one added to the tests in this PR. It's taken directly from the mysql producer tests.)
You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/sql-translator/pull/87

-- Commit Summary --

  * MySQL Parser understands VIEWs with a field list.

-- File Changes --

    M lib/SQL/Translator/Parser/MySQL.pm (2)
    M t/02mysql-parser.t (13)

-- Patch Links --

https://github.com/dbsrgits/sql-translator/pull/87.patch
https://github.com/dbsrgits/sql-translator/pull/87.diff

-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20170402/2dba7a28/attachment.htm>


More information about the DBIx-Class-Devel mailing list