程序包 com.databend.jdbc

# 类 DatabendConnection

java.lang.Object
com.databend.jdbc.DatabendConnection

所有已实现的接口:
  `FileTransferAPI`, `AutoCloseable`, `Connection`, `Wrapper`

public class DatabendConnection extends Object implements Connection, FileTransferAPI

## 字段概要

### 从接口继承的字段 java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

## 方法概要

修饰符和类型
方法
说明
`void`
`abort(Executor executor)`
`void`
`clearWarnings()`
`void`
`close()`
`void`
`commit()`
`void`
`copyIntoTable(String database, String tableName, DatabendCopyParams params)`
Copy into the target table from files on the internal stage Documentation: https://databend.rs/doc/sql-commands/dml/dml-copy-into-table
`Array`
`createArrayOf(String s, Object[] objects)`
`Blob`
`createBlob()`
`Clob`
`createClob()`
`NClob`
`createNClob()`
`SQLXML`
`createSQLXML()`
`Statement`
`createStatement()`
`Statement`
`createStatement(int resultSetType, int resultSetConcurrency)`
`Statement`
`createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`Struct`
`createStruct(String s, Object[] objects)`
`InputStream`
`downloadStream(String stageName, String sourceFileName, boolean decompress)`
Download a file from the databend internal stage, the data would be downloaded as one file with no split.
`boolean`
`getAutoCommit()`
`String`
`getCatalog()`
`Properties`
`getClientInfo()`
`String`
`getClientInfo(String s)`
`static String`
`getCopyIntoSql(String database, DatabendCopyParams params)`
`int`
`getHoldability()`
`okhttp3.OkHttpClient`
`getHttpClient()`
`DatabaseMetaData`
`getMetaData()`
`int`
`getNetworkTimeout()`
`com.databend.client.PaginationOptions`
`getPaginationOptions()`
`String`
`getSchema()`
`com.databend.client.DatabendSession`
`getSession()`
`int`
`getTransactionIsolation()`
`Map<String,Class<?>>`
`getTypeMap()`
`URI`
`getURI()`
`SQLWarning`
`getWarnings()`
`boolean`
`isClosed()`
`boolean`
`isReadOnly()`
`boolean`
`isValid(int i)`
`boolean`
`isWrapperFor(Class<?> aClass)`
`String`
`nativeSQL(String sql)`
`CallableStatement`
`prepareCall(String s)`
`CallableStatement`
`prepareCall(String s, int i, int i1)`
`CallableStatement`
`prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`PreparedStatement`
`prepareStatement(String s)`
`PreparedStatement`
`prepareStatement(String s, int autoGeneratedKeys)`
`PreparedStatement`
`prepareStatement(String s, int[] ints)`
`PreparedStatement`
`prepareStatement(String s, int i, int i1)`
`PreparedStatement`
`prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`PreparedStatement`
`prepareStatement(String s, String[] strings)`
`boolean`
`presignedUrlDisabled()`
`void`
`releaseSavepoint(Savepoint savepoint)`
`void`
`rollback()`
`void`
`rollback(Savepoint savepoint)`
`void`
`setAutoCommit(boolean b)`
`void`
`setCatalog(String s)`
`void`
`setClientInfo(String s, String s1)`
`void`
`setClientInfo(Properties properties)`
`void`
`setHoldability(int holdability)`
`void`
`setNetworkTimeout(Executor executor, int i)`
`void`
`setReadOnly(boolean b)`
`Savepoint`
`setSavepoint()`
`Savepoint`
`setSavepoint(String s)`
`void`
`setSchema(String schema)`
`void`
`setSession(com.databend.client.DatabendSession session)`
`void`
`setTransactionIsolation(int i)`
`void`
`setTypeMap(Map<String,Class<?>> map)`
`<T> T`
`unwrap(Class<T> aClass)`
`void`
`uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData)`
Upload inputStream to the databend internal stage, the data would be uploaded as one file with no split.

### 从类继承的方法 java.lang.Object

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

### 从接口继承的方法 java.sql.Connection

`beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid`

## 方法详细资料

### getCopyIntoSql

public static String getCopyIntoSql(String database, DatabendCopyParams params)

### getSession

public com.databend.client.DatabendSession getSession()

### setSession

public void setSession(com.databend.client.DatabendSession session)

### getHttpClient

public okhttp3.OkHttpClient getHttpClient()

### createStatement

public Statement createStatement() throws SQLException

指定者:
  `createStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String s) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareCall

public CallableStatement prepareCall(String s) throws SQLException

指定者:
  `prepareCall` 在接口中 `Connection`
抛出:
  `SQLException`

### nativeSQL

public String nativeSQL(String sql) throws SQLException

指定者:
  `nativeSQL` 在接口中 `Connection`
抛出:
  `SQLException`

### commit

public void commit() throws SQLException

指定者:
  `commit` 在接口中 `Connection`
抛出:
  `SQLException`

### getAutoCommit

public boolean getAutoCommit() throws SQLException

指定者:
  `getAutoCommit` 在接口中 `Connection`
抛出:
  `SQLException`

### setAutoCommit

public void setAutoCommit(boolean b) throws SQLException

指定者:
  `setAutoCommit` 在接口中 `Connection`
抛出:
  `SQLException`

### rollback

public void rollback() throws SQLException

指定者:
  `rollback` 在接口中 `Connection`
抛出:
  `SQLException`

### close

public void close() throws SQLException

指定者:
  `close` 在接口中 `AutoCloseable`
指定者:
  `close` 在接口中 `Connection`
抛出:
  `SQLException`

### isClosed

public boolean isClosed() throws SQLException

指定者:
  `isClosed` 在接口中 `Connection`
抛出:
  `SQLException`

### getMetaData

public DatabaseMetaData getMetaData() throws SQLException

指定者:
  `getMetaData` 在接口中 `Connection`
抛出:
  `SQLException`

### isReadOnly

public boolean isReadOnly() throws SQLException

指定者:
  `isReadOnly` 在接口中 `Connection`
抛出:
  `SQLException`

### setReadOnly

public void setReadOnly(boolean b) throws SQLException

指定者:
  `setReadOnly` 在接口中 `Connection`
抛出:
  `SQLException`

### getCatalog

public String getCatalog() throws SQLException

指定者:
  `getCatalog` 在接口中 `Connection`
抛出:
  `SQLException`

### setCatalog

public void setCatalog(String s) throws SQLException

指定者:
  `setCatalog` 在接口中 `Connection`
抛出:
  `SQLException`

### getTransactionIsolation

public int getTransactionIsolation() throws SQLException

指定者:
  `getTransactionIsolation` 在接口中 `Connection`
抛出:
  `SQLException`

### setTransactionIsolation

public void setTransactionIsolation(int i) throws SQLException

指定者:
  `setTransactionIsolation` 在接口中 `Connection`
抛出:
  `SQLException`

### getWarnings

public SQLWarning getWarnings() throws SQLException

指定者:
  `getWarnings` 在接口中 `Connection`
抛出:
  `SQLException`

### clearWarnings

public void clearWarnings() throws SQLException

指定者:
  `clearWarnings` 在接口中 `Connection`
抛出:
  `SQLException`

### createStatement

public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException

指定者:
  `createStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String s, int i, int i1) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareCall

public CallableStatement prepareCall(String s, int i, int i1) throws SQLException

指定者:
  `prepareCall` 在接口中 `Connection`
抛出:
  `SQLException`

### getTypeMap

public Map<String,Class<?>> getTypeMap() throws SQLException

指定者:
  `getTypeMap` 在接口中 `Connection`
抛出:
  `SQLException`

### setTypeMap

public void setTypeMap(Map<String,Class<?>> map) throws SQLException

指定者:
  `setTypeMap` 在接口中 `Connection`
抛出:
  `SQLException`

### getHoldability

public int getHoldability() throws SQLException

指定者:
  `getHoldability` 在接口中 `Connection`
抛出:
  `SQLException`

### setHoldability

@NotImplemented public void setHoldability(int holdability) throws SQLException

指定者:
  `setHoldability` 在接口中 `Connection`
抛出:
  `SQLException`

### setSavepoint

public Savepoint setSavepoint() throws SQLException

指定者:
  `setSavepoint` 在接口中 `Connection`
抛出:
  `SQLException`

### setSavepoint

public Savepoint setSavepoint(String s) throws SQLException

指定者:
  `setSavepoint` 在接口中 `Connection`
抛出:
  `SQLException`

### rollback

public void rollback(Savepoint savepoint) throws SQLException

指定者:
  `rollback` 在接口中 `Connection`
抛出:
  `SQLException`

### releaseSavepoint

public void releaseSavepoint(Savepoint savepoint) throws SQLException

指定者:
  `releaseSavepoint` 在接口中 `Connection`
抛出:
  `SQLException`

### createStatement

public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

指定者:
  `createStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareCall

public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

指定者:
  `prepareCall` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String s, int autoGeneratedKeys) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String s, int[] ints) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### prepareStatement

public PreparedStatement prepareStatement(String s, String[] strings) throws SQLException

指定者:
  `prepareStatement` 在接口中 `Connection`
抛出:
  `SQLException`

### createClob

public Clob createClob() throws SQLException

指定者:
  `createClob` 在接口中 `Connection`
抛出:
  `SQLException`

### createBlob

public Blob createBlob() throws SQLException

指定者:
  `createBlob` 在接口中 `Connection`
抛出:
  `SQLException`

### createNClob

public NClob createNClob() throws SQLException

指定者:
  `createNClob` 在接口中 `Connection`
抛出:
  `SQLException`

### createSQLXML

public SQLXML createSQLXML() throws SQLException

指定者:
  `createSQLXML` 在接口中 `Connection`
抛出:
  `SQLException`

### isValid

public boolean isValid(int i) throws SQLException

指定者:
  `isValid` 在接口中 `Connection`
抛出:
  `SQLException`

### setClientInfo

public void setClientInfo(String s, String s1) throws SQLClientInfoException

指定者:
  `setClientInfo` 在接口中 `Connection`
抛出:
  `SQLClientInfoException`

### getClientInfo

public String getClientInfo(String s) throws SQLException

指定者:
  `getClientInfo` 在接口中 `Connection`
抛出:
  `SQLException`

### getClientInfo

public Properties getClientInfo() throws SQLException

指定者:
  `getClientInfo` 在接口中 `Connection`
抛出:
  `SQLException`

### setClientInfo

public void setClientInfo(Properties properties) throws SQLClientInfoException

指定者:
  `setClientInfo` 在接口中 `Connection`
抛出:
  `SQLClientInfoException`

### createArrayOf

public Array createArrayOf(String s, Object[] objects) throws SQLException

指定者:
  `createArrayOf` 在接口中 `Connection`
抛出:
  `SQLException`

### createStruct

public Struct createStruct(String s, Object[] objects) throws SQLException

指定者:
  `createStruct` 在接口中 `Connection`
抛出:
  `SQLException`

### getSchema

public String getSchema() throws SQLException

指定者:
  `getSchema` 在接口中 `Connection`
抛出:
  `SQLException`

### setSchema

public void setSchema(String schema) throws SQLException

指定者:
  `setSchema` 在接口中 `Connection`
抛出:
  `SQLException`

### abort

public void abort(Executor executor) throws SQLException

指定者:
  `abort` 在接口中 `Connection`
抛出:
  `SQLException`

### setNetworkTimeout

public void setNetworkTimeout(Executor executor, int i) throws SQLException

指定者:
  `setNetworkTimeout` 在接口中 `Connection`
抛出:
  `SQLException`

### getNetworkTimeout

public int getNetworkTimeout() throws SQLException

指定者:
  `getNetworkTimeout` 在接口中 `Connection`
抛出:
  `SQLException`

### unwrap

public <T> T unwrap(Class<T> aClass) throws SQLException

指定者:
  `unwrap` 在接口中 `Wrapper`
抛出:
  `SQLException`

### isWrapperFor

public boolean isWrapperFor(Class<?> aClass) throws SQLException

指定者:
  `isWrapperFor` 在接口中 `Wrapper`
抛出:
  `SQLException`

### presignedUrlDisabled

public boolean presignedUrlDisabled()

### getPaginationOptions

public com.databend.client.PaginationOptions getPaginationOptions()

### getURI

public URI getURI()

### uploadStream

public void uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData) throws SQLException
从接口复制的说明: `FileTransferAPI`
Upload inputStream to the databend internal stage, the data would be uploaded as one file with no split. Caller should close the input stream after the upload is done.

指定者:
  `uploadStream` 在接口中 `FileTransferAPI`
参数:
  `stageName` - the stage which receive uploaded file
  `destPrefix` - the prefix of the file name in the stage
  `inputStream` - the input stream of the file
  `destFileName` - the destination file name in the stage
  `compressData` - whether to compress the data
抛出:
  `SQLException` - failed to upload input stream

### downloadStream

public InputStream downloadStream(String stageName, String sourceFileName, boolean decompress) throws SQLException
从接口复制的说明: `FileTransferAPI`
Download a file from the databend internal stage, the data would be downloaded as one file with no split.

指定者:
  `downloadStream` 在接口中 `FileTransferAPI`
参数:
  `stageName` - the stage which contains the file
  `sourceFileName` - the file name in the stage
  `decompress` - whether to decompress the data
返回:
  the input stream of the file
抛出:
  `SQLException`

### copyIntoTable

public void copyIntoTable(String database, String tableName, DatabendCopyParams params) throws SQLException
从接口复制的说明: `FileTransferAPI`
Copy into the target table from files on the internal stage Documentation: https://databend.rs/doc/sql-commands/dml/dml-copy-into-table

指定者:
  `copyIntoTable` 在接口中 `FileTransferAPI`
参数:
  `database` - the target table's database
  `tableName` - the target table name
  `params` - copy options and file options
抛出:
  `SQLException`