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