Community
Participate
Working Groups
Build Identifier: 3.7.0.2011-Jun 2011 PROBLEM DESCRIPTION: The class SqlFormatter can be used to wellform SQL queries. Scout itself uses it to write failed queries to the error log. However, there are certain keywords that make the parser fail and return the rest of the query "unparsed". For debugging purposes, it would be helpful when the parser could understand those keywords (as the are quite common). EVALUATION: The current version of the parser does not seem to consider any kind of "SqlStyle", so I assume it is intended to parse "Oracle SQL" only. The parser is pattern based, but those pattern do not cover the full Oracle SQL grammar [1]. [1] http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_10002.htm PROPOSED SOLUTION: Add missing keywords to increase the percentage of "parsable" queries. The attachment contains a JUnit test demonstrating some of the failing cases (remove the @Ignore annotation to execute those tests). Reproducible: Always
Created attachment 200976 [details] JUnit test cases
Historically removed...