@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class DefaultSchemaHandler extends java.lang.Object implements SchemaHandler
Resolves the schema names
| Type | Name and description |
|---|---|
java.lang.String |
createSchemaStatement |
java.lang.String |
defaultSchemaName |
java.lang.String |
useSchemaStatement |
| Constructor and description |
|---|
DefaultSchemaHandler() |
DefaultSchemaHandler(java.lang.String useSchemaStatement, java.lang.String createSchemaStatement, java.lang.String defaultSchemaName) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
createSchema(java.sql.Connection connection, java.lang.String name) |
|
protected static java.lang.String |
quoteName(java.sql.Connection connection, java.lang.String name)Quotes a schema/catalog identifier using the JDBC-reported identifier quote character so that schema names are never spliced as raw SQL tokens. |
|
java.util.Collection<java.lang.String> |
resolveSchemaNames(javax.sql.DataSource dataSource) |
|
void |
useDefaultSchema(java.sql.Connection connection) |
|
void |
useSchema(java.sql.Connection connection, java.lang.String name) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Quotes a schema/catalog identifier using the JDBC-reported identifier quote character so that schema names are never spliced as raw SQL tokens. Any embedded occurrences of the quote character itself are stripped from the name to prevent escaping the enclosure.
If the driver reports " " (space) as the quote string — meaning identifier quoting
is not supported — the name is returned as-is (preserving existing behaviour).