Class DatabaseConnection.DCProcedureConnection

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.sql.Connection jdbc_connection
      The JDBCConnection created by this object.
      private User previous_user
      The User of this connection before this procedure was started.
      private boolean transaction_disabled_flag
      The 'close_transaction_disabled' flag when this connection was created.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void dispose()  
      Database getDatabase()
      Returns the Database object for this database providing access to various general database features including backing up replication and configuration.
      java.sql.Connection getJDBCConnection()
      Returns a JDBC Connection implementation for executing queries on this connection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • previous_user

        private User previous_user
        The User of this connection before this procedure was started.
      • transaction_disabled_flag

        private boolean transaction_disabled_flag
        The 'close_transaction_disabled' flag when this connection was created.
      • jdbc_connection

        private java.sql.Connection jdbc_connection
        The JDBCConnection created by this object.
    • Constructor Detail

      • DCProcedureConnection

        private DCProcedureConnection()
    • Method Detail

      • getJDBCConnection

        public java.sql.Connection getJDBCConnection()
        Description copied from interface: ProcedureConnection
        Returns a JDBC Connection implementation for executing queries on this connection. The Connection has auto-commit turned off, and it disables the ability for the connection to 'commit' changes to the database.

        This method is intended to provide the procedure developer with a convenient and consistent way to query and manipulate the database from the body of a stored procedure method.

        The java.sql.Connection object returned here may invalidate when the procedure invokation call ends so the returned object must not be cached to be used again later.

        The returned java.sql.Connection object is NOT thread safe and should only be used by a single thread. Accessing this connection from multiple threads will result in undefined behaviour.

        The Connection object returned here has the same privs as the user who owns the stored procedure.

        Specified by:
        getJDBCConnection in interface ProcedureConnection
      • getDatabase

        public Database getDatabase()
        Description copied from interface: ProcedureConnection
        Returns the Database object for this database providing access to various general database features including backing up replication and configuration. Some procedures may not be allowed access to this object in which case a ProcedureException is thrown notifying of the security violation.
        Specified by:
        getDatabase in interface ProcedureConnection
      • dispose

        void dispose()