Userful minimal parser for sql and hive quires.
We are not official author of this library, We pick few useful files to just parse query & get errors + suggestedKeywords
Please visit official website for more info
Download or clone this repo by using belowe command
git clone https://github.com/deuex-solutions/sql-parser.git
Refer below example for use.
**import** sqlAutocompleteParser from 'sql-parser';
const beforeCursor = 'SELECT col1, col2, tbl2.col3 FROM tbl; '; // Note extra space at end
const afterCursor = '';
const dialect = 'hive';
const debug = false;
console.log(
JSON.stringify(
sqlAutocompleteParser.parseSql(beforeCursor, afterCursor, dialect, debug),
null,
2
)
);
Found an issue? Post it in the issue tracker.
Want to add another awesome feature? Fork this repository and add your feature, then send a pull request.
The MIT License (MIT)