public class JDEscapeClause
extends java.lang.Object
This class represents an escape clause in a SQL statement. It is used to translate SQL statements with JDBC escape syntax to DB2 for IBM i format.
Constructor and Description |
---|
JDEscapeClause() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
parse(com.ibm.as400.access.JDSQLTokenizer tokenizer,
java.lang.String decimalSeparator,
boolean flag,
int vrm)
Parses an escape clause, and substitute it with native SQL.
|
static java.lang.String |
parse(java.lang.String escapeSyntax,
java.lang.String decimalSeparator,
int vrm)
Parses an escape clause, and substitute it with native SQL.
|
public static java.lang.String parse(java.lang.String escapeSyntax, java.lang.String decimalSeparator, int vrm) throws java.sql.SQLException
escapeSyntax
- SQL escape syntax.decimalSeparator
- The decimal separator.java.sql.SQLException
- If there is a syntax error or
a reference to an unsupported
scalar function.public static java.lang.String parse(com.ibm.as400.access.JDSQLTokenizer tokenizer, java.lang.String decimalSeparator, boolean flag, int vrm) throws java.sql.SQLException
When the flag is true, the tokenized string is considered to be the entire SQL statement and will end at the end of the string.
When the flag is false, the tokenized string is considered to be just a single escape clause, starting 1 token after its left brace. It will end at the matching right brace.
tokenizer
- The tokenized string.decimalSeparator
- The decimal separator.flag
- The flag.java.sql.SQLException
- If there is a syntax error or
a reference to an unsupported
scalar function.