Class BaseSession

    • Field Detail

      • originalSchemaNameOrSearchPath

        protected final String originalSchemaNameOrSearchPath
    • Constructor Detail

    • Method Detail

      • getCurrentSchemaNameOrSearchPath

        protected abstract String getCurrentSchemaNameOrSearchPath()
                                                            throws SQLException
        Throws:
        SQLException - when the current schema name or search path could not be retrieved.
      • getCurrentSchema

        public Schema getCurrentSchema()
        Description copied from interface: Session
        Retrieves the current schema, which is the default owner of new database objects. In many databases, the current schema is also used to lookup tables whenever the schema qualifier is omitted.
        Specified by:
        getCurrentSchema in interface Session
      • changeCurrentSchemaTo

        public void changeCurrentSchemaTo​(Schema schema)
        Description copied from interface: Session
        Sets the current schema, which is the default owner of new database objects. In many databases, the current schema is also used to lookup tables whenever the schema qualifier is omitted.
        Specified by:
        changeCurrentSchemaTo in interface Session
      • doChangeCurrentSchemaOrSearchPathTo

        protected void doChangeCurrentSchemaOrSearchPathTo​(String schemaNameOrSearchPath)
                                                    throws SQLException
        Parameters:
        schemaNameOrSearchPath - The new current schema for this connection.
        Throws:
        SQLException - when the current schema could not be set.
      • lock

        public <T> T lock​(Table table,
                          Callable<T> callable)
        Description copied from interface: Session
        Locks this table and executes this callable.
        Specified by:
        lock in interface Session
        Returns:
        The result of the callable.
      • restoreOriginalState

        public final void restoreOriginalState()
        Description copied from interface: Session
        Undoes all changes to database settings and variables whose scope is bound to the lifetime of the JDBC connection. An example of such state is the search_path setting of PostgreSQL. Methods that may change state are:

        Will only undo changes that have been made through this object. Changes made by migration scripts are not accounted for.

        Specified by:
        restoreOriginalState in interface Session
      • getDatabase

        public Database getDatabase()