nom-sql icon indicating copy to clipboard operation
nom-sql copied to clipboard

Disallow illlegal trailing commas in order by clause

Open tomharmon opened this issue 5 years ago • 0 comments

Currently on master:

https://github.com/ms705/nom-sql/blob/026473b277586e07359ae4a591dca5a39e74a349/src/order.rs#L58

In src/order.rs, the order by clause allows for trailing commas, which is technically invalid SQL. Eg, "select * from users order by name ascage desc,\n" will parse, but should not

In the incoming bump nom to v5 PR, this is on line 76 of the same file:

76        many0(order_expr),

tomharmon avatar Feb 03 '20 14:02 tomharmon