本文整理汇总了Java中net.sf.jsqlparser.statement.delete.Delete.setTable方法的典型用法代码示例。如果您正苦于以下问题:Java Delete.setTable方法的具体用法?Java Delete.setTable怎么用?Java Delete.setTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jsqlparser.statement.delete.Delete
的用法示例。
在下文中一共展示了Delete.setTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import net.sf.jsqlparser.statement.delete.Delete; //导入方法依赖的package包/类
/**
* mysql 'delete' doesn't support alais
*/
@Override
public void visit(Delete delete) {
if (enableLimitCheck && delete.getLimit() == null) {
throw new IllegalStateException("no limit in sql: " + sql);
}
this.getStack().push(new FrameContext());
ShardRouteConfig routeConfig = shardRouter.getRouteConfig(delete.getTable().getSchemaName(),
delete.getTable().getName());
if (routeConfig != null) {
TableWrapper tab = new TableWrapper(delete.getTable(), routeConfig);
delete.setTable(tab);
addRoutedTableIntoContext(tab, routeConfig, false);
}
super.visit(delete);
afterVisitBaseStatement();
}
示例2: Delete
import net.sf.jsqlparser.statement.delete.Delete; //导入方法依赖的package包/类
final public Delete Delete() throws ParseException {
Delete delete = new Delete();
Table table = null;
Expression where = null;
jj_consume_token(K_DELETE);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_FROM:
jj_consume_token(K_FROM);
break;
default:
jj_la1[17] = jj_gen;
;
}
table = TableWithAlias();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_WHERE:
where = WhereClause();
delete.setWhere(where);
break;
default:
jj_la1[18] = jj_gen;
;
}
delete.setTable(table);
{if (true) return delete;}
throw new Error("Missing return statement in function");
}
示例3: Delete
import net.sf.jsqlparser.statement.delete.Delete; //导入方法依赖的package包/类
final public Delete Delete() throws ParseException {Delete delete = new Delete();
Table table = null;
Alias alias = null;
Expression where = null;
Token tk = null;
//<K_DELETE> [<K_FROM>] table=TableWithAlias()
tk = jj_consume_token(K_DELETE);
if (tk.specialToken != null) {
delete.setComment(tk.specialToken.image);
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case K_FROM:{
tk = jj_consume_token(K_FROM);
if (tk.specialToken != null) {
delete.setFromComment(tk.specialToken.image);
}
break;
}
default:
jj_la1[16] = jj_gen;
;
}
table = Table();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case K_AS:
case S_IDENTIFIER:
case S_QUOTED_IDENTIFIER:{
alias = Alias();
table.setAlias(alias);
break;
}
default:
jj_la1[17] = jj_gen;
;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case K_WHERE:{
tk = jj_consume_token(K_WHERE);
if (tk.specialToken != null) {
delete.setWhereComment(tk.specialToken.image);
}
where = WhereClause();
delete.setWhere(where);
break;
}
default:
jj_la1[18] = jj_gen;
;
}
delete.setTable(table);
{if ("" != null) return delete;}
throw new Error("Missing return statement in function");
}