Interface SchemaNameResolver

All Known Implementing Classes:
DefaultSchemaNameResolver

public interface SchemaNameResolver
Contract for resolving the schema of a Connection.
API Note:
Exists mainly for historical reasons when Hibernate baselines on Java versions before 8 when Connection.getSchema() was introduced. We still use it at the moment because some drivers do not implement it (jTDS) and/or some databases do not support schemas and their drivers don't DoTheRightThing.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveSchemaName(Connection connection, Dialect dialect)
    Given a JDBC Connection, resolve the name of the schema (if one) to which it connects.
  • Method Details

    • resolveSchemaName

      String resolveSchemaName(Connection connection, Dialect dialect) throws SQLException
      Given a JDBC Connection, resolve the name of the schema (if one) to which it connects.
      Parameters:
      connection - The JDBC connection
      dialect - The Dialect
      Returns:
      The name of the schema; may be null.
      Throws:
      SQLException