MCPcopy Index your code
hub / github.com/Nemo1870/sql-parse / parse

Method parse

src/main/java/com/sql/parse/statement/Select.java:142–162  ·  view source on GitHub ↗

@title: parse @desc Select解析器

(String sql)

Source from the content-addressed store, hash-verified

140 * @desc Select解析器
141 */
142 public static Select parse(String sql) {
143 switch (SqlParseConfig.getHandle()) {
144 case "com.github.jsqlparser":{
145 try {
146 return com.sql.parse.statement.impl.jsqlparser.Select.parse(sql);
147 } catch (ClassCastException e) {
148 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Select");
149 }
150 }
151 case "com.alibaba.druid":{
152 try {
153 return com.sql.parse.statement.impl.druid.Select.parse(sql);
154 } catch (ClassCastException e) {
155 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Select");
156 }
157 }
158 default:{
159 throw BaseException.errorCode(SqlParseConstant.CODE_018);
160 }
161 }
162 }
163}

Callers 15

testParseMethod · 0.95
testSelectWithWhereMethod · 0.95
testSelectWithAndMethod · 0.95
testSelectWithOrMethod · 0.95
testSelectWithJoinMethod · 0.95

Calls 2

getHandleMethod · 0.95
errorCodeMethod · 0.95

Tested by 15

testParseMethod · 0.76
testSelectWithWhereMethod · 0.76
testSelectWithAndMethod · 0.76
testSelectWithOrMethod · 0.76
testSelectWithJoinMethod · 0.76