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

Class Delete

src/main/java/com/sql/parse/statement/Delete.java:11–76  ·  view source on GitHub ↗

@date 2019年4月30日上午09:58:02 @desc Delete语法操作类

Source from the content-addressed store, hash-verified

9 * @desc Delete语法操作类
10 */
11public abstract class Delete extends Statement {
12 @Override
13 public abstract String getSql(boolean safe);
14
15 /**
16 * @title: where
17 * @desc "WHERE"符号
18 */
19 public abstract Delete where(String expr);
20
21 /**
22 * @title: and
23 * @desc 移除where条件
24 */
25 public abstract Delete removeAllWhere();
26
27 /**
28 * @title: and
29 * @desc "AND"符号
30 */
31 public abstract Delete and(String expr);
32
33 /**
34 * @title: or
35 * @desc "OR"符号
36 */
37 public abstract Delete or(String expr);
38
39// /**
40// * @title: orderBy
41// * @desc "ORDER BY"符号
42// */
43// public abstract Delete orderBy(String... columnNames);
44//
45// /**
46// * @title: limit
47// * @desc "LIMIT"符号
48// */
49// public abstract Delete limit(int rows);
50
51 /**
52 * @title: parse
53 * @desc Delete解析器
54 */
55 public static Delete parse(String sql) {
56 switch (SqlParseConfig.getHandle()) {
57 case "com.github.jsqlparser":{
58 try {
59 return com.sql.parse.statement.impl.jsqlparser.Delete.parse(sql);
60 } catch (ClassCastException e) {
61 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Delete");
62 }
63 }
64 case "com.alibaba.druid":{
65 try {
66 return com.sql.parse.statement.impl.druid.Delete.parse(sql);
67 } catch (ClassCastException e) {
68 throw BaseException.errorCode(SqlParseConstant.CODE_020, "Delete");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected