use of io.seata.common.exception.NotSupportYetException in project seata by seata.
the class MySQLDeleteRecognizer method getTableName.
@Override
public String getTableName() {
StringBuilder sb = new StringBuilder();
MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) {
@Override
public boolean visit(SQLExprTableSource x) {
printTableSourceExpr(x.getExpr());
return false;
}
@Override
public boolean visit(SQLJoinTableSource x) {
throw new NotSupportYetException("not support the syntax of delete with join table");
}
};
SQLTableSource tableSource;
if (ast.getFrom() == null) {
tableSource = ast.getTableSource();
} else {
tableSource = ast.getFrom();
}
if (tableSource instanceof SQLExprTableSource) {
visitor.visit((SQLExprTableSource) tableSource);
} else if (tableSource instanceof SQLJoinTableSource) {
visitor.visit((SQLJoinTableSource) tableSource);
} else {
throw new NotSupportYetException("not support the syntax of delete with unknow");
}
return sb.toString();
}
use of io.seata.common.exception.NotSupportYetException in project seata by seata.
the class MySQLUpdateRecognizer method getTableName.
@Override
public String getTableName() {
StringBuilder sb = new StringBuilder();
MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) {
@Override
public boolean visit(SQLExprTableSource x) {
printTableSourceExpr(x.getExpr());
return false;
}
@Override
public boolean visit(SQLJoinTableSource x) {
throw new NotSupportYetException("not support the syntax of update with join table");
}
};
SQLTableSource tableSource = ast.getTableSource();
if (tableSource instanceof SQLExprTableSource) {
visitor.visit((SQLExprTableSource) tableSource);
} else if (tableSource instanceof SQLJoinTableSource) {
visitor.visit((SQLJoinTableSource) tableSource);
} else {
throw new NotSupportYetException("not support the syntax of update with unknow");
}
return sb.toString();
}
use of io.seata.common.exception.NotSupportYetException in project seata by seata.
the class OracleDeleteRecognizer method getTableName.
@Override
public String getTableName() {
StringBuilder sb = new StringBuilder();
OracleOutputVisitor visitor = new OracleOutputVisitor(sb) {
@Override
public boolean visit(SQLExprTableSource x) {
printTableSourceExpr(x.getExpr());
return false;
}
@Override
public boolean visit(SQLJoinTableSource x) {
throw new NotSupportYetException("not support the syntax of delete with join table");
}
};
SQLTableSource tableSource;
if (ast.getFrom() == null) {
tableSource = ast.getTableSource();
} else {
tableSource = ast.getFrom();
}
if (tableSource instanceof SQLExprTableSource) {
visitor.visit((SQLExprTableSource) tableSource);
} else if (tableSource instanceof SQLJoinTableSource) {
visitor.visit((SQLJoinTableSource) tableSource);
} else {
throw new NotSupportYetException("not support the syntax of delete with unknow");
}
return sb.toString();
}
use of io.seata.common.exception.NotSupportYetException in project seata by seata.
the class OracleUpdateRecognizer method getTableName.
@Override
public String getTableName() {
StringBuilder sb = new StringBuilder();
OracleOutputVisitor visitor = new OracleOutputVisitor(sb) {
@Override
public boolean visit(SQLExprTableSource x) {
printTableSourceExpr(x.getExpr());
return false;
}
@Override
public boolean visit(SQLJoinTableSource x) {
throw new NotSupportYetException("not support the syntax of update with join table");
}
};
SQLTableSource tableSource = ast.getTableSource();
if (tableSource instanceof SQLExprTableSource) {
visitor.visit((SQLExprTableSource) tableSource);
} else if (tableSource instanceof SQLJoinTableSource) {
visitor.visit((SQLJoinTableSource) tableSource);
} else {
throw new NotSupportYetException("not support the syntax of update with unknow");
}
return sb.toString();
}
use of io.seata.common.exception.NotSupportYetException in project seata by seata.
the class PostgresqlDeleteRecognizer method getTableName.
@Override
public String getTableName() {
StringBuilder sb = new StringBuilder();
PGOutputVisitor visitor = new PGOutputVisitor(sb) {
@Override
public boolean visit(SQLExprTableSource x) {
printTableSourceExpr(x.getExpr());
return false;
}
@Override
public boolean visit(SQLJoinTableSource x) {
throw new NotSupportYetException("not support the syntax of delete with join table");
}
};
SQLTableSource tableSource;
if (ast.getFrom() == null) {
tableSource = ast.getTableSource();
} else {
tableSource = ast.getFrom();
}
if (tableSource instanceof SQLExprTableSource) {
visitor.visit((SQLExprTableSource) tableSource);
} else if (tableSource instanceof SQLJoinTableSource) {
visitor.visit((SQLJoinTableSource) tableSource);
} else {
throw new NotSupportYetException("not support the syntax of delete with unknow");
}
return sb.toString();
}
Aggregations