Package com.databend.jdbc
Class DatabendPreparedStatement
java.lang.Object
com.databend.jdbc.DatabendStatement
com.databend.jdbc.DatabendPreparedStatement
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
-
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()static com.databend.client.StageAttachmentbuildStateAttachment(DatabendConnection connection, String stagePath) This method is used to build a StageAttachment object which represents a stage in Databend.voidvoidvoidclose()static StringconvertArrayListToString(ArrayList<?> arrayList) static StringconvertArrayToString(Array array) static StringconvertSQLWithBatchValues(String baseSql, List<String[]> batchValues) static StringconvertToJsonString(Map<?, ?> map) booleanexecute()protected booleanexecute(List<StatementInfoWrapper> statements) int[]int[]int[]int[]intprotected voidvoidvoidsetAsciiStream(int i, InputStream inputStream) voidsetAsciiStream(int i, InputStream inputStream, int i1) voidsetAsciiStream(int i, InputStream inputStream, long l) voidsetBigDecimal(int i, BigDecimal bigDecimal) voidsetBinaryStream(int i, InputStream inputStream) voidsetBinaryStream(int i, InputStream inputStream, int i1) voidsetBinaryStream(int i, InputStream inputStream, long l) voidsetBlob(int i, InputStream inputStream) voidsetBlob(int i, InputStream inputStream, long l) voidvoidsetBoolean(int i, boolean b) voidsetByte(int i, byte b) voidsetBytes(int i, byte[] bytes) voidsetCharacterStream(int i, Reader reader) voidsetCharacterStream(int i, Reader reader, int i1) voidsetCharacterStream(int i, Reader reader, long l) voidvoidvoidvoidvoidvoidsetDouble(int i, double v) voidsetFloat(int i, float v) voidsetInt(int i, int i1) voidsetLong(int i, long l) voidsetNCharacterStream(int i, Reader reader) voidsetNCharacterStream(int i, Reader reader, long l) voidvoidvoidvoidsetNString(int i, String s) voidsetNull(int i, int i1) voidvoidvoidvoidvoidvoidvoidsetShort(int i, short i1) voidvoidvoidvoidvoidsetTimestamp(int i, Timestamp timestamp) voidsetTimestamp(int i, Timestamp timestamp, Calendar calendar) voidsetUnicodeStream(int i, InputStream inputStream, int i1) voidMethods inherited from class com.databend.jdbc.DatabendStatement
addBatch, cancel, checkOpen, clearWarnings, closeOnCompletion, connection, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, optionalConnection, queryLiveness, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObjectMethods inherited from interface java.sql.Statement
addBatch, cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Overrides:
closein classDatabendStatement- Throws:
SQLException
-
buildStateAttachment
public static com.databend.client.StageAttachment buildStateAttachment(DatabendConnection connection, String stagePath) This method is used to build a StageAttachment object which represents a stage in Databend. A stage in Databend is a temporary storage area where data files are stored before being loaded into the Databend database.- Parameters:
connection- The DatabendConnection object which contains the connection details to the Databend database.stagePath- The path of the stage in the Databend database.- Returns:
- A StageAttachment object which contains the details of the stage.
-
executeBatchByAttachment
- Throws:
SQLException
-
executeBatchByCopyInto
- Throws:
SQLException
-
executeBatchDelete
- Throws:
SQLException
-
convertSQLWithBatchValues
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classDatabendStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfacePreparedStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfacePreparedStatement- Throws:
SQLException
-
execute
- Throws:
SQLException
-
handleBatchInsert
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfacePreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setBoolean
- Specified by:
setBooleanin interfacePreparedStatement- Throws:
SQLException
-
setByte
- Specified by:
setBytein interfacePreparedStatement- Throws:
SQLException
-
setShort
- Specified by:
setShortin interfacePreparedStatement- Throws:
SQLException
-
setInt
- Specified by:
setIntin interfacePreparedStatement- Throws:
SQLException
-
setLong
- Specified by:
setLongin interfacePreparedStatement- Throws:
SQLException
-
setFloat
- Specified by:
setFloatin interfacePreparedStatement- Throws:
SQLException
-
setDouble
- Specified by:
setDoublein interfacePreparedStatement- Throws:
SQLException
-
setBigDecimal
- Specified by:
setBigDecimalin interfacePreparedStatement- Throws:
SQLException
-
setString
- Specified by:
setStringin interfacePreparedStatement- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfacePreparedStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setUnicodeStream
- Specified by:
setUnicodeStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
clearParameters
- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
convertToJsonString
-
convertArrayToString
-
convertArrayListToString
-
addBatch
- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classDatabendStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setRef
- Specified by:
setRefin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setArray
- Specified by:
setArrayin interfacePreparedStatement- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaDatain interfacePreparedStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setURL
- Specified by:
setURLin interfacePreparedStatement- Throws:
SQLException
-
getParameterMetaData
- Specified by:
getParameterMetaDatain interfacePreparedStatement- Throws:
SQLException
-
setRowId
- Specified by:
setRowIdin interfacePreparedStatement- Throws:
SQLException
-
setNString
- Specified by:
setNStringin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXMLin interfacePreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-