@title: parse @desc Update解析器
(String sql)
| 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 | } |