|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.core.database.SqlCommentScrubber
public class SqlCommentScrubber
This class represents a parser that will remove SQL comments (both multi-line and single-line) from a string representing a SQL query. It respects the notion of a string literal, such that if a comment appears in a string literal, it is treated as part of the string instead of a comment. Both single-quoted and double-quoted string literals are supported, including nested quotes (whether the SQL dialect supports them or not).
Field Summary | |
---|---|
static int |
EOF
End-of-File (EOF) indicator |
static int |
EOL
End-of-Line (EOL) indicator |
Method Summary | |
---|---|
static String |
removeComments(String text)
This method will remove SQL comments (both multi-line and single-line) from a string representing a SQL query. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EOF
public static final int EOL
Method Detail |
---|
public static String removeComments(String text)
text
- a string representing the SQL query to parse and from which to remove comments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |