parse is responsible for parsing a
query string and recognizing tokens in relation to parameters (either
named, JPA-style, or ordinal) and providing callbacks about such
recognitions.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ParameterParser.Recognizer
Maybe better named a Journaler. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | parse(String
The string to be parsed/tokenized. sqlString, ParameterParser.The thing which handles recognition events. recognizerPerforms the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens. |
| public static boolean | Returns: true/falseThe SQL string to check sqlString)Exposed as public solely for use from tests |
| ParameterParser | back to summary |
|---|---|
| private ParameterParser() Direct instantiation of ParameterParser disallowed. | |
| parse | back to summary |
|---|---|
| public static void parse(String sqlString, ParameterParser. 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.
| |
| startsWithEscapeCallTemplate | back to summary |
|---|---|
| public static boolean startsWithEscapeCallTemplate(String sqlString) Exposed as public solely for use from tests
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | jpaPositionalParameter(int
The identifier (name) of the JPA-style parameter identifier, int The position within the query position)Called when a JPA-style named parameter is recognized |
| public void | namedParameter(String
The recognized parameter name name, int The position within the query position)Called when a named parameter is recognized |
| public void | ordinalParameter(int
The position within the query position)Called when an ordinal parameter is recognized |
| public void | other(char
The recognized character character)Called when a character that is not a parameter (or part of a parameter definition) is recognized. |
| public void | outParameter(int
The position within the query position)Called when an output parameter is recognized |
| complete | back to summary |
|---|---|
| public void complete() | |
| jpaPositionalParameter | back to summary |
|---|---|
| public void jpaPositionalParameter(int identifier, int position) Called when a JPA-style named parameter is recognized
| |
| namedParameter | back to summary |
|---|---|
| public void namedParameter(String name, int position) Called when a named parameter is recognized
| |
| ordinalParameter | back to summary |
|---|---|
| public void ordinalParameter(int position) Called when an ordinal parameter is recognized
| |
| other | back to summary |
|---|---|
| public void other(char character) Called when a character that is not a parameter (or part of a parameter definition) is recognized.
| |
| outParameter | back to summary |
|---|---|
| public void outParameter(int position) Called when an output parameter is recognized
| |