Class SQLStatementInspector

    • Constructor Detail

      • SQLStatementInspector

        public SQLStatementInspector()
    • Method Detail

      • inspect

        public String inspect​(String sql)
        Description copied from interface: StatementInspector
        Inspect the given SQL, possibly returning a different SQL to be used instead. Note that returning null is interpreted as returning the same SQL as was passed.
        Specified by:
        inspect in interface StatementInspector
        Parameters:
        sql - The SQL to inspect
        Returns:
        The SQL to use; may be null
      • getSqlQueries

        public List<String> getSqlQueries()
      • clear

        public void clear()
      • getNumberOfJoins

        public int getNumberOfJoins​(int position)
      • assertExecuted

        public void assertExecuted​(String expected)
      • assertNumberOfJoins

        public void assertNumberOfJoins​(int queryNumber,
                                        int expectedNumberOfJoins)
      • assertExecutedCount

        public void assertExecutedCount​(int expected)
      • assertNumberOfJoins

        public void assertNumberOfJoins​(int queryNumber,
                                        SqlAstJoinType joinType,
                                        int expectedNumberOfOccurrences)
      • assertNumberOfOccurrenceInQuery

        public void assertNumberOfOccurrenceInQuery​(int queryNumber,
                                                    String toCheck,
                                                    int expectedNumberOfOccurrences)
      • assertIsSelect

        public void assertIsSelect​(int queryNumber)
      • assertIsInsert

        public void assertIsInsert​(int queryNumber)
      • assertIsUpdate

        public void assertIsUpdate​(int queryNumber)