Class InsertStatementParser.InsertInfo

java.lang.Object
com.databricks.jdbc.common.util.InsertStatementParser.InsertInfo
Enclosing class:
InsertStatementParser

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

  • Method Details

    • getTableName

      public String getTableName()
    • getColumns

      public List<String> getColumns()
    • 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 (?, ?, ?), (?, ?, ?)
       
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object