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 Constructor Description SavedPreparedStatement(String sql, TSDBPreparedStatement tsdbPreparedStatement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBatch()int[]executeBatch()execute the sql with batch sqlintexecuteBatchInternal()voidsetParam(int parameterIndex, Object x)set current row params
-
-
-
Constructor Detail
-
SavedPreparedStatement
public SavedPreparedStatement(String sql, TSDBPreparedStatement tsdbPreparedStatement) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
setParam
public void setParam(int parameterIndex, Object x) throws SQLExceptionset 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 SQLExceptionexecute the sql with batch sql- Returns:
- Throws:
SQLException
-
executeBatchInternal
public int executeBatchInternal() throws SQLException- Throws:
SQLException
-
-