Closed LyzSg closed 1 month ago
Describe the bug The following example works fine in mysql, but will fail to parse here:
const { Parser } = require('node-sql-parser'); const parser = new Parser(); // use COLLATE with order by parser.astify( 'select * from test order by id COLLATE utf8mb4_unicode_ci' ); //[SyntaxError]: Expected "!=", "#", "%", "&", "&&", "(", "*", "+", ",", "-", "--", "->", "->>", ".", "/", "/*", ";", "<", "<<", "<=", "<>", "=", ">", ">=", ">>", "ASC", "BETWEEN", "DESC", "FOR", "GO", "IN", "INTERSECT", "INTO", "IS", "LIKE", "LIMIT", "LOCK", "MINUS", "NOT", "ORDER", "REGEXP", "RLIKE", "UNION", "WINDOW", "XOR", "^", "div", "|", "||", [ \t\n\r], or end of input but "C" found. // or with where parser.astify( 'select * from test where id COLLATE utf8mb4_unicode_ci = 1' ); // [SyntaxError]: Expected "#", "--", "/*", ";", "FOR", "GO", "GROUP", "HAVING", "INTERSECT", "INTO", "LIMIT", "LOCK", "MINUS", "ORDER", "UNION", "WINDOW", [ \t\n\r], or end of input but "=" found.
Database Engine MySQL
To Reproduce -the node-sql-parser version 5.2.0 -the node version 18.20.3
Describe the bug The following example works fine in mysql, but will fail to parse here:
Database Engine MySQL
To Reproduce -the node-sql-parser version 5.2.0 -the node version 18.20.3