felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
213 stars 78 forks source link

Add row limiting clause for select statement #62

Closed lm-net closed 6 years ago

lm-net commented 6 years ago

Hello Felipe, I've just found your project and it's excellent piece of work. Unfortunately, I'm missing row limiting clause as described here https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#BABBADDD

So, I tried to implement it

Honestly, I'm using GIT for the first time, so just let me know, if there are any problems.

EDIT: I've found small error - row limiting clause could be used without order by clause.

lm-net commented 6 years ago

Hi Felipe, thanks for finding the error. I tried to fix it and added 2 new test cases for select statement.

I hope, I've managed to merge this branch with master correctly (I'm new to GIT, so I'm still learning how to use it).