File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/net/sf/jsqlparser/parser Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,20 @@ public static Statement parse(String sql) throws JSQLParserException {
4040 return parse (sql , null );
4141 }
4242
43+ /**
44+ * Parses an sql statement while allowing via consumer to configure the used parser before.
45+ *
46+ * For instance to activate SQLServer bracket quotation on could use:
47+ *
48+ * {@code
49+ * CCJSqlParserUtil.parse("select * from [mytable]", parser -> parser.withSquareBracketQuotation(true));
50+ * }
51+ *
52+ * @param sql
53+ * @param consumer
54+ * @return
55+ * @throws JSQLParserException
56+ */
4357 public static Statement parse (String sql , Consumer <CCJSqlParser > consumer ) throws JSQLParserException {
4458 CCJSqlParser parser = new CCJSqlParser (new StringProvider (sql ));
4559 if (consumer != null ) {
You can’t perform that action at this time.
0 commit comments