forward / sql-parser

A SQL parser written in pure JS
MIT License
531 stars 132 forks source link

Implemented function call without parameters and subselects as fields #18

Closed haskellcamargo closed 8 years ago

haskellcamargo commented 8 years ago

Now, the following are valid:

SELECT (SELECT A FROM B) FROM C SELECT A(B(C())) FROM D

Additions to grammar:

Expression

o "SubSelectExpression"

UserFunction

o "LITERAL LEFT_PAREN RIGHT_PAREN"

This, before, would generate a syntax error. Also, I included a require directive to coffee-script/register, that is necessary to build via cake build.

haskellcamargo commented 8 years ago

Solves #17

andykent commented 8 years ago

Hi sorry, I was away for a few days but this looks good. Thanks a bunch for the change.