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

Method parse

src/main/java/com/sql/parse/statement/Update.java:66–86  ·  view source on GitHub ↗

@title: parse @desc Update解析器

(String sql)

Source from the content-addressed store, hash-verified

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

Callers 15

testParseMethod · 0.95
testSimpleUpdateMethod · 0.95
testUpdateAddColumnMethod · 0.95
testUpdateWithWhereMethod · 0.95
testUpdateWithAndMethod · 0.95
testUpdateWithOrMethod · 0.95
testParseMethod · 0.95
testSimpleUpdateMethod · 0.95
testUpdateAddColumnMethod · 0.95
testUpdateWithWhereMethod · 0.95
testUpdateWithAndMethod · 0.95

Calls 2

getHandleMethod · 0.95
errorCodeMethod · 0.95

Tested by 15

testParseMethod · 0.76
testSimpleUpdateMethod · 0.76
testUpdateAddColumnMethod · 0.76
testUpdateWithWhereMethod · 0.76
testUpdateWithAndMethod · 0.76
testUpdateWithOrMethod · 0.76
testParseMethod · 0.76
testSimpleUpdateMethod · 0.76
testUpdateAddColumnMethod · 0.76
testUpdateWithWhereMethod · 0.76
testUpdateWithAndMethod · 0.76