@date 2019年4月30日上午09:58:02 @desc Insert语法操作类
| 12 | * @desc Insert语法操作类 |
| 13 | */ |
| 14 | public abstract class Insert extends Statement { |
| 15 | @Override |
| 16 | public abstract String getSql(boolean safe); |
| 17 | |
| 18 | /** |
| 19 | * @title: addColumn |
| 20 | * @desc 新增insert数据列 |
| 21 | */ |
| 22 | public abstract Insert addColumn(String column); |
| 23 | |
| 24 | /** |
| 25 | * @title: addColumn |
| 26 | * @desc 新增insert数据列 |
| 27 | */ |
| 28 | public abstract Insert addColumn(String column, String value); |
| 29 | |
| 30 | /** |
| 31 | * @title: addColumn |
| 32 | * @desc 新增insert数据列 |
| 33 | */ |
| 34 | public abstract Insert addColumn(InsertItem insertItem); |
| 35 | |
| 36 | /** |
| 37 | * @title: addValue |
| 38 | * @desc 新增insert数据列 |
| 39 | */ |
| 40 | public abstract Insert addValueColumn(String value); |
| 41 | |
| 42 | /** |
| 43 | * @title: addValue |
| 44 | * @desc 新增insert数据条数 |
| 45 | */ |
| 46 | public abstract Insert addValue(String... valueColumns); |
| 47 | |
| 48 | /** |
| 49 | * @title: addValue |
| 50 | * @desc 新增insert数据条数 |
| 51 | */ |
| 52 | public abstract Insert addValue(List<String> value); |
| 53 | |
| 54 | /** |
| 55 | * @title: addColumn |
| 56 | * @desc 新增insert数据子查询 |
| 57 | */ |
| 58 | public abstract Insert setSelect(Select select); |
| 59 | |
| 60 | public Insert setSelect(String select) { |
| 61 | return setSelect(Select.parse(select)); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * @title: parse |
| 66 | * @desc Insert解析器 |
| 67 | */ |
| 68 | public static Insert parse(String sql) { |
| 69 | switch (SqlParseConfig.getHandle()) { |
| 70 | case "com.github.jsqlparser":{ |
| 71 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected