程序包 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.
    • 字段详细资料

      • ON_DUPLICATE_KEY_UPDATE_CLAUSE

        protected static final String[] ON_DUPLICATE_KEY_UPDATE_CLAUSE
      • numberOfQueries

        public int numberOfQueries
    • 构造器详细资料

      • ParseInfo

        public ParseInfo​(String sql,
                         Session session,
                         String encoding,
                         boolean buildRewriteInfo)
    • 方法详细资料

      • 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
      • 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()