public class ParseInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
numberOfQueries |
protected static java.lang.String[] |
ON_DUPLICATE_KEY_UPDATE_CLAUSE |
Constructor and Description |
---|
ParseInfo(java.lang.String sql,
Session session,
java.lang.String encoding) |
ParseInfo(java.lang.String sql,
Session session,
java.lang.String encoding,
boolean buildRewriteInfo) |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
canRewrite(java.lang.String sql,
boolean isOnDuplicateKeyUpdate,
int locationOfOnDuplicateKeyUpdate,
int statementStartPos) |
boolean |
canRewriteAsMultiValueInsertAtSqlLevel() |
boolean |
containsOnDuplicateKeyUpdateInSQL() |
protected static int |
findStartOfStatement(java.lang.String sql) |
char |
getFirstStmtChar() |
int |
getLocationOfOnDuplicateKeyUpdate() |
static int |
getOnDuplicateKeyLocation(java.lang.String sql,
boolean dontCheckOnDuplicateKeyUpdateInSQL,
boolean rewriteBatchedStatements,
boolean noBackslashEscapes) |
ParseInfo |
getParseInfoForBatch(int numBatch)
Returns a ParseInfo for a multi-value INSERT for a batch of size numBatch (without parsing!).
|
java.lang.String |
getSqlForBatch()
Used for filling in the SQL for getPreparedSql() - for debugging
|
java.lang.String |
getSqlForBatch(int numBatch)
Returns a preparable SQL string for the number of batched parameters; used by server-side prepared statements
when re-writing batch INSERTs.
|
byte[][] |
getStaticSql() |
java.lang.String |
getValuesClause() |
boolean |
isFoundLoadData() |
protected static final java.lang.String[] ON_DUPLICATE_KEY_UPDATE_CLAUSE
public int numberOfQueries
public ParseInfo(java.lang.String sql, Session session, java.lang.String encoding)
public ParseInfo(java.lang.String sql, Session session, java.lang.String encoding, boolean buildRewriteInfo)
public byte[][] getStaticSql()
public java.lang.String getValuesClause()
public int getLocationOfOnDuplicateKeyUpdate()
public boolean canRewriteAsMultiValueInsertAtSqlLevel()
public boolean containsOnDuplicateKeyUpdateInSQL()
public ParseInfo getParseInfoForBatch(int numBatch)
numBatch
- number of batched parametersParseInfo
public java.lang.String getSqlForBatch(int numBatch) throws java.io.UnsupportedEncodingException
numBatch
- number of batched parametersjava.io.UnsupportedEncodingException
- if an error occurspublic java.lang.String getSqlForBatch() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- if an error occursprotected static int findStartOfStatement(java.lang.String sql)
public static int getOnDuplicateKeyLocation(java.lang.String sql, boolean dontCheckOnDuplicateKeyUpdateInSQL, boolean rewriteBatchedStatements, boolean noBackslashEscapes)
protected static boolean canRewrite(java.lang.String sql, boolean isOnDuplicateKeyUpdate, int locationOfOnDuplicateKeyUpdate, int statementStartPos)
public boolean isFoundLoadData()
public char getFirstStmtChar()