Package com.databricks.jdbc.common.util

## 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 Summary

Constructors
`InsertInfo​(String tableName, List<String> columns, String originalSql)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(Object o)`
`int` `getColumnCount()`
`List<String>` `getColumns()`
`String` `getOriginalSql()`
`String` `getTableName()`
`int` `hashCode()`
`boolean` `isCompatibleWith​(InsertStatementParser.InsertInfo other)` Checks if this INSERT is compatible with another INSERT for batching.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### InsertInfo

    public InsertInfo​(String tableName,
                      List<String> columns,
                      String originalSql)

### Method Detail

#### 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`