程序包 com.mysql.cj
类 ParseInfo
- java.lang.Object
-
- com.mysql.cj.ParseInfo
-
public class ParseInfo extends Object
Represents the "parsed" state of a prepared query, with the statement broken up into its static and dynamic (where parameters are bound) parts.
-
-
字段概要
字段 修饰符和类型 字段 说明 intnumberOfQueriesprotected static String[]ON_DUPLICATE_KEY_UPDATE_CLAUSE
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected static booleancanRewrite(String sql, boolean isOnDuplicateKeyUpdate, int locationOfOnDuplicateKeyUpdate, int statementStartPos)booleancanRewriteAsMultiValueInsertAtSqlLevel()booleancontainsOnDuplicateKeyUpdateInSQL()protected static intfindStartOfStatement(String sql)chargetFirstStmtChar()intgetLocationOfOnDuplicateKeyUpdate()static intgetOnDuplicateKeyLocation(String sql, boolean dontCheckOnDuplicateKeyUpdateInSQL, boolean rewriteBatchedStatements, boolean noBackslashEscapes)ParseInfogetParseInfoForBatch(int numBatch)Returns a ParseInfo for a multi-value INSERT for a batch of size numBatch (without parsing!).StringgetSqlForBatch()Used for filling in the SQL for getPreparedSql() - for debuggingStringgetSqlForBatch(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()StringgetValuesClause()booleanisFoundLoadData()
-
-
-
字段详细资料
-
ON_DUPLICATE_KEY_UPDATE_CLAUSE
protected static final String[] ON_DUPLICATE_KEY_UPDATE_CLAUSE
-
numberOfQueries
public int numberOfQueries
-
-
方法详细资料
-
getStaticSql
public byte[][] getStaticSql()
-
getValuesClause
public String getValuesClause()
-
getLocationOfOnDuplicateKeyUpdate
public int getLocationOfOnDuplicateKeyUpdate()
-
canRewriteAsMultiValueInsertAtSqlLevel
public boolean canRewriteAsMultiValueInsertAtSqlLevel()
-
containsOnDuplicateKeyUpdateInSQL
public boolean containsOnDuplicateKeyUpdateInSQL()
-
getParseInfoForBatch
public ParseInfo getParseInfoForBatch(int numBatch)
Returns a ParseInfo for a multi-value INSERT for a batch of size numBatch (without parsing!).- 参数:
numBatch- number of batched parameters- 返回:
ParseInfo
-
getSqlForBatch
public String getSqlForBatch(int numBatch) throws UnsupportedEncodingException
Returns a preparable SQL string for the number of batched parameters; used by server-side prepared statements when re-writing batch INSERTs.- 参数:
numBatch- number of batched parameters- 返回:
- SQL string
- 抛出:
UnsupportedEncodingException- if an error occurs
-
getSqlForBatch
public String getSqlForBatch() throws UnsupportedEncodingException
Used for filling in the SQL for getPreparedSql() - for debugging- 返回:
- sql string
- 抛出:
UnsupportedEncodingException- if an error occurs
-
findStartOfStatement
protected static int findStartOfStatement(String sql)
-
getOnDuplicateKeyLocation
public static int getOnDuplicateKeyLocation(String sql, boolean dontCheckOnDuplicateKeyUpdateInSQL, boolean rewriteBatchedStatements, boolean noBackslashEscapes)
-
canRewrite
protected static boolean canRewrite(String sql, boolean isOnDuplicateKeyUpdate, int locationOfOnDuplicateKeyUpdate, int statementStartPos)
-
isFoundLoadData
public boolean isFoundLoadData()
-
getFirstStmtChar
public char getFirstStmtChar()
-
-