Class JUnitPreparedStatementImpl

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.sql.PreparedStatement, java.sql.Statement, java.sql.Wrapper

    public class JUnitPreparedStatementImpl
    extends PreparedStatementImpl
    For testing sql errors while execution.
    • Constructor Detail

      • JUnitPreparedStatementImpl

        public JUnitPreparedStatementImpl​(ConnectionImpl conn,
                                          java.sql.PreparedStatement statement,
                                          java.lang.String query)
    • Method Detail

      • setError

        public void setError​(boolean hasError)
        Allows to force each execution to throw a SQLException.
        Parameters:
        hasError -
      • wrapResultSet

        protected java.sql.ResultSet wrapResultSet​(java.sql.ResultSet real)
                                            throws java.sql.SQLException
        Description copied from class: StatementImpl
        returns a wrapped ResultSet
        Overrides:
        wrapResultSet in class StatementImpl
        Throws:
        java.sql.SQLException