Class BaseExecutor

    • Field Detail

      • deferredLoads

        protected java.util.concurrent.ConcurrentLinkedQueue<org.apache.ibatis.executor.BaseExecutor.DeferredLoad> deferredLoads
      • localOutputParameterCache

        protected PerpetualCache localOutputParameterCache
      • queryStack

        protected int queryStack
    • Method Detail

      • close

        public void close​(boolean forceRollback)
        Specified by:
        close in interface Executor
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface Executor
      • update

        public int update​(MappedStatement ms,
                          java.lang.Object parameter)
                   throws java.sql.SQLException
        Specified by:
        update in interface Executor
        Throws:
        java.sql.SQLException
      • flushStatements

        public java.util.List<BatchResult> flushStatements()
                                                    throws java.sql.SQLException
        Specified by:
        flushStatements in interface Executor
        Throws:
        java.sql.SQLException
      • flushStatements

        public java.util.List<BatchResult> flushStatements​(boolean isRollBack)
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • query

        public <E> java.util.List<E> query​(MappedStatement ms,
                                           java.lang.Object parameter,
                                           RowBounds rowBounds,
                                           ResultHandler resultHandler)
                                    throws java.sql.SQLException
        Specified by:
        query in interface Executor
        Throws:
        java.sql.SQLException
      • commit

        public void commit​(boolean required)
                    throws java.sql.SQLException
        Specified by:
        commit in interface Executor
        Throws:
        java.sql.SQLException
      • rollback

        public void rollback​(boolean required)
                      throws java.sql.SQLException
        Specified by:
        rollback in interface Executor
        Throws:
        java.sql.SQLException
      • doUpdate

        protected abstract int doUpdate​(MappedStatement ms,
                                        java.lang.Object parameter)
                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • doFlushStatements

        protected abstract java.util.List<BatchResult> doFlushStatements​(boolean isRollback)
                                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • doQuery

        protected abstract <E> java.util.List<E> doQuery​(MappedStatement ms,
                                                         java.lang.Object parameter,
                                                         RowBounds rowBounds,
                                                         ResultHandler resultHandler,
                                                         BoundSql boundSql)
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • doQueryCursor

        protected abstract <E> Cursor<E> doQueryCursor​(MappedStatement ms,
                                                       java.lang.Object parameter,
                                                       RowBounds rowBounds,
                                                       BoundSql boundSql)
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • closeStatement

        protected void closeStatement​(java.sql.Statement statement)
      • applyTransactionTimeout

        protected void applyTransactionTimeout​(java.sql.Statement statement)
                                        throws java.sql.SQLException
        Apply a transaction timeout.
        Parameters:
        statement - a current statement
        Throws:
        java.sql.SQLException - if a database access error occurs, this method is called on a closed Statement
        Since:
        3.4.0
        See Also:
        StatementUtil.applyTransactionTimeout(Statement, Integer, Integer)
      • getConnection

        protected java.sql.Connection getConnection​(Log statementLog)
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException