MCPcopy Create free account
hub / github.com/Nemo1870/sql-parse / parse

Method parse

src/main/java/com/sql/parse/statement/Insert.java:68–88  ·  view source on GitHub ↗

@title: parse @desc Insert解析器

(String sql)

Source from the content-addressed store, hash-verified

66 * @desc Insert解析器
67 */
68 public static Insert parse(String sql) {
69 switch (SqlParseConfig.getHandle()) {
70 case "com.github.jsqlparser":{
71 try {
72 return com.sql.parse.statement.impl.jsqlparser.Insert.parse(sql);
73 } catch (ClassCastException e) {
74 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Insert");
75 }
76 }
77 case "com.alibaba.druid":{
78 try {
79 return com.sql.parse.statement.impl.druid.Insert.parse(sql);
80 } catch (ClassCastException e) {
81 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Insert");
82 }
83 }
84 default:{
85 throw BaseException.errorCode(SqlParseConstant.CODE_018);
86 }
87 }
88 }
89}

Callers 15

testParseMethod · 0.95
testInsertWithValueMethod · 0.95
testInsertAddColumnMethod · 0.95
testInsertWithSelectMethod · 0.95
testParseMethod · 0.95
testInsertWithValueMethod · 0.95
testInsertAddColumnMethod · 0.95

Calls 2

getHandleMethod · 0.95
errorCodeMethod · 0.95

Tested by 15

testParseMethod · 0.76
testInsertWithValueMethod · 0.76
testInsertAddColumnMethod · 0.76
testInsertWithSelectMethod · 0.76
testParseMethod · 0.76
testInsertWithValueMethod · 0.76
testInsertAddColumnMethod · 0.76