Skip to content

Commit 69593cd

Browse files
Add JaveDocs to QueryStringUtil
1 parent 47639fc commit 69593cd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/org/javawebstack/orm/test/shared/util/QueryStringUtil.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
import static org.javawebstack.orm.test.shared.knowledge.QueryKnowledgeBase.TOP_LEVEL_SELECT_KEYWORDS;
1212
import static org.junit.jupiter.api.Assertions.fail;
1313

14+
/**
15+
* The QueryStringUtil class wraps a normal string which is assumed, but not verified, to be an SQL query and provides
16+
* various utility functions for tests purposes on them.
17+
*/
1418
public class QueryStringUtil {
1519

1620
String queryString;
@@ -20,6 +24,13 @@ public QueryStringUtil(String queryString) {
2024
}
2125

2226

27+
/**
28+
* Retrieves all sections of the query prefaced by the given top level keyword. Does not include the keyword and
29+
* is delimited by the next top level keyword occurrence if it exists.
30+
* @param topLevelKeyword The top level SQL select query keyword to look for.
31+
* @return A list of strings containing only the inner part of the query. It will include additional spaces if the
32+
* query had more than one space.
33+
*/
2334
public List<String> getTopLevelSectionsByKeyword(String topLevelKeyword) {
2435
String capitalizedKeyword = topLevelKeyword.toUpperCase(Locale.ROOT);
2536
String queryString = this.queryString;

0 commit comments

Comments
 (0)