Documentation of 'com.ziclix.python.sql.handler.UpdateCountDataHandler' Java class
UpdateCountDataHandler
com.ziclix.python.sql.handler

Class UpdateCountDataHandler



  • public class UpdateCountDataHandler
    extends FilterDataHandler
    A data handler that keeps track of the update count for each execution of a Statement.

    Note: MySql does not return the correct count for a delete statement that has no where clause. Therefore, to assure the correct update count is returned, either include a where clause, or understand that the value will always be 0.

    See Also:
    Statement.getUpdateCount()
    • Field Detail

      • updateCount

        public int updateCount
        The update count for the last executed statement.
    • Constructor Detail

      • UpdateCountDataHandler

        public UpdateCountDataHandler(DataHandler datahandler)
        Handle capturing the update count. The initial value of the updateCount is -1.
    • Method Detail

      • preExecute

        public void preExecute(java.sql.Statement stmt)
                        throws java.sql.SQLException
        Sets the update count to -1 prior to the statement being executed.
        Overrides:
        preExecute in class FilterDataHandler
        Throws:
        java.sql.SQLException
      • postExecute

        public void postExecute(java.sql.Statement stmt)
                         throws java.sql.SQLException
        Gets the update count from the statement after successfully executing.
        Overrides:
        postExecute in class FilterDataHandler
        Throws:
        java.sql.SQLException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.