AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.04k stars 659 forks source link

Using a reserved words in sql causes an ambiguous error #974

Open kylebernhardy opened 6 years ago

kylebernhardy commented 6 years ago

There is excellent documentation on alasql's reserved words: https://github.com/agershun/alasql/wiki/AlaSQL-Keywords

However it would be helpful to receive a more concise error that a reserved word was detected in the SQL.

See sample below:

https://runkit.com/kylebernhardy/alasql.reserved.words

mathiasrw commented 6 years ago

This is a good input. The error is autogenerated from the JISON parser. Not sure how to improve the words. Would an adiccional "If you use any reserved words, please encapsulate in [...] or `...`" in the end help?

kylebernhardy commented 6 years ago

I like the additional verbage, that would be perfect