forward / sql-parser

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

STAR and multiplication #6

Closed agershun closed 9 years ago

agershun commented 9 years ago

If I try to parse conditions or assignments with '*', the system gives the following error:

SQLParser.parse('UPDATE t1 SET a=b*100')

Uncaught Error: Parse error on line 2: Unexpected 'STAR'

Could you fix it, please.

andykent commented 9 years ago

Thanks for reporting the issue.

You are right, the parser was getting confused between a wildcard * and a multiplication * in some situations. I fixed this in cb87533

However it appears you are trying to parse an UPDATE query, this project currently only supports SELECT queries so I think you'll need to extend the syntax to get this example working.