Package com.salesforce.datacloud.jdbc
Class DataCloudDatasource
java.lang.Object
com.salesforce.datacloud.jdbc.DataCloudDatasource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
The DataCloudDatasource provides a type-safe way create a DataCloudConnection.
Use the `DataCloudDatasource.builder()` interface to configure the data source.
After configuring the data source, call `DataCloudDatasource.getConnection()` to connect.
Furthermore, `connectUsingProperties` can be used to connect using a URL and properties.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptsURL(String url) Checks if the URL is a valid Data Cloud JDBC URL.builder()static com.salesforce.datacloud.jdbc.core.DataCloudConnectionconnectUsingProperties(@NonNull String url, Properties info) Connects to the Data Cloud using the given URL and properties.getConnection(String username, String password) intbooleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <T> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Field Details
-
NOT_SUPPORTED_IN_DATACLOUD_QUERY
- See Also:
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
acceptsURL
Checks if the URL is a valid Data Cloud JDBC URL. -
connectUsingProperties
public static com.salesforce.datacloud.jdbc.core.DataCloudConnection connectUsingProperties(@NonNull @NonNull String url, Properties info) throws SQLException Connects to the Data Cloud using the given URL and properties. Similar to the interface accessible via `DriverManager.getConnection()`.- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
builder
-