Class InsertStatementParser.InsertInfo

  • Enclosing class:
    InsertStatementParser

    public static class InsertStatementParser.InsertInfo
    extends Object
    Represents the parsed components of an INSERT statement.
    • Method Detail

      • getTableName

        public String getTableName()
      • getOriginalSql

        public String getOriginalSql()
      • getColumnCount

        public int getColumnCount()
      • isCompatibleWith

        public boolean isCompatibleWith​(InsertStatementParser.InsertInfo other)
        Checks if this INSERT is compatible with another INSERT for batching. Two INSERTs are compatible if they target the same table with the same columns in the same order.

        Compatible INSERT operations can be combined into multi-row INSERT statements for improved performance. For example, these two statements are compatible:

           INSERT INTO users (id, name, email) VALUES (?, ?, ?)
           INSERT INTO users (id, name, email) VALUES (?, ?, ?)
         
        These can be batched into:
           INSERT INTO users (id, name, email) VALUES (?, ?, ?), (?, ?, ?)
         
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object