Package com.taosdata.jdbc

## Class SavedPreparedStatement

- java.lang.Object
- - com.taosdata.jdbc.SavedPreparedStatement

    public class SavedPreparedStatement
    extends Object

this class is used to precompile the sql of tdengine insert or import ops

### Constructor Summary

Constructors
`SavedPreparedStatement​(String sql, TSDBPreparedStatement tsdbPreparedStatement)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addBatch()`
`int[]` `executeBatch()` execute the sql with batch sql
`int` `executeBatchInternal()`
`void` `setParam​(int parameterIndex, Object x)` set current row params

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

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

### Constructor Detail

#### SavedPreparedStatement

    public SavedPreparedStatement​(String sql,
                                  TSDBPreparedStatement tsdbPreparedStatement)
                           throws SQLException

Throws:
  `SQLException`

### Method Detail

#### setParam

    public void setParam​(int parameterIndex,
                         Object x)
                  throws SQLException

set current row params

Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the parameter value
Throws:
  `SQLException`

#### addBatch

    public void addBatch()

#### executeBatch

    public int[] executeBatch()
                       throws SQLException

execute the sql with batch sql

Returns:
Throws:
  `SQLException`

#### executeBatchInternal

    public int executeBatchInternal()
                             throws SQLException

Throws:
  `SQLException`