Class ParameterParser

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  ParameterParser.Recognizer
      Maybe better named a Journaler.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void parse​(java.lang.String sqlString, ParameterParser.Recognizer recognizer)
      Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens.
      static boolean startsWithEscapeCallTemplate​(java.lang.String sqlString)
      Exposed as public solely for use from tests
      • Methods inherited from class java.lang.Object

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

      • parse

        public static void parse​(java.lang.String sqlString,
                                 ParameterParser.Recognizer recognizer)
                          throws QueryException
        Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens.

        Note that currently, this only knows how to deal with a single output parameter (for callable statements). If we later add support for multiple output params, this, obviously, needs to change.

        Parameters:
        sqlString - The string to be parsed/tokenized.
        recognizer - The thing which handles recognition events.
        Throws:
        QueryException - Indicates unexpected parameter conditions.
      • startsWithEscapeCallTemplate

        public static boolean startsWithEscapeCallTemplate​(java.lang.String sqlString)
        Exposed as public solely for use from tests
        Parameters:
        sqlString - The SQL string to check
        Returns:
        true/false