class TempTableDataSourceProvider extends java.lang.Object implements DataSourceProvider
Implements prepared statement caching in a manner compatible with H2's prepared statement implementation.
| Modifier and Type | Class and Description |
|---|---|
private static class |
TempTableDataSourceProvider.DataSourceImpl
Implementation of the
DataSource interface, which maintains context-local data for each
private temp-table connection. |
private static class |
TempTableDataSourceProvider.PSKey
Prepared statement cache key.
|
| Constructor and Description |
|---|
TempTableDataSourceProvider() |
| Modifier and Type | Method and Description |
|---|---|
javax.sql.DataSource |
getDataSource(Database database,
DatabaseConfig cfg)
Obtain the
DataSource for a specific Database, within the current context. |
static boolean |
isProxy(java.sql.Connection conn)
Check if the connection is a proxy delivered by this provider.
|
static java.sql.Connection |
unwrapProxy(java.sql.Connection conn)
Retrieve the original connection without proxy.
|
public static boolean isProxy(java.sql.Connection conn)
conn - The connection to be checked.true if the provided connection is proxied by this provider.public static java.sql.Connection unwrapProxy(java.sql.Connection conn)
conn - The connection to unwrap.public javax.sql.DataSource getDataSource(Database database, DatabaseConfig cfg)
DataSource for a specific Database, within the current context.getDataSource in interface DataSourceProviderdatabase - The FWD Database that needs a connection to backing database.cfg - The configuration for the given database.DataSource for the specified Database.