@groovy.transform.CompileStatic class SchemaTenantDataSource extends MultiTenantDataSource
A MultiTenantDataSource that switches to a specific schema on every connection and wraps the returned connection in a MultiTenantConnection so that the schema is restored when the connection is closed.
| Properties inherited from class | Properties |
|---|---|
class MultiTenantDataSource |
target, tenantId |
| Constructor and description |
|---|
SchemaTenantDataSource(javax.sql.DataSource target, java.lang.String schemaName, SchemaHandler schemaHandler) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.sql.Connection |
getConnection() |
|
java.sql.Connection |
getConnection(java.lang.String username, java.lang.String password) |