本文整理了Java中net.sf.jsqlparser.schema.Table.getWholeTableName()
方法的一些代码示例,展示了Table.getWholeTableName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getWholeTableName()
方法的具体详情如下:
包路径:net.sf.jsqlparser.schema.Table
类名称:Table
方法名:getWholeTableName
暂无
代码示例来源:origin: alibaba/mdrill
public String toString() {
return getWholeTableName()+((alias!=null)?" AS "+alias:"");
}
}
代码示例来源:origin: alibaba/mdrill
/**
* @return the name of the column, prefixed with 'tableName' and '.'
*/
public String getWholeColumnName() {
String columnWholeName = null;
String tableWholeName = table.getWholeTableName();
if (tableWholeName != null && tableWholeName.length() != 0) {
columnWholeName = tableWholeName + "." + columnName;
} else {
columnWholeName = columnName;
}
return columnWholeName;
}
代码示例来源:origin: alibaba/mdrill
public void visit(Table tableName) {
buffer.append(tableName.getWholeTableName());
String alias = tableName.getAlias();
if (alias != null && !alias.equals("")) {
buffer.append(" AS " + alias);
}
}
代码示例来源:origin: alibaba/mdrill
public void visit(AllTableColumns allTableColumns) {
buffer.append(allTableColumns.getTable().getWholeTableName() + ".*");
}
代码示例来源:origin: alibaba/mdrill
public void visit(Column tableColumn) {
String tableName = tableColumn.getTable().getWholeTableName();
if (tableName != null) {
buffer.append(tableName + ".");
}
buffer.append(tableColumn.getColumnName());
}
代码示例来源:origin: alibaba/mdrill
public void deParse(Insert insert) {
buffer.append("INSERT INTO ");
buffer.append(insert.getTable().getWholeTableName());
if (insert.getColumns() != null) {
buffer.append("(");
for (Iterator iter = insert.getColumns().iterator(); iter.hasNext();) {
Column column = (Column) iter.next();
buffer.append(column.getColumnName());
if (iter.hasNext()) {
buffer.append(", ");
}
}
buffer.append(")");
}
insert.getItemsList().accept(this);
}
代码示例来源:origin: alibaba/mdrill
public void deParse(Delete delete) {
buffer.append("DELETE FROM " + delete.getTable().getWholeTableName());
if (delete.getWhere() != null) {
buffer.append(" WHERE ");
delete.getWhere().accept(expressionVisitor);
}
}
public ExpressionVisitor getExpressionVisitor() {
代码示例来源:origin: alibaba/mdrill
public void deParse(CreateTable createTable) {
buffer.append("CREATE TABLE " + createTable.getTable().getWholeTableName());
if (createTable.getColumnDefinitions() != null) {
buffer.append(" { ");
代码示例来源:origin: alibaba/mdrill
public void deParse(Update update) {
buffer.append("UPDATE " + update.getTable().getWholeTableName() + " SET ");
for (int i = 0; i < update.getColumns().size(); i++) {
Column column = (Column) update.getColumns().get(i);
buffer.append(column.getWholeColumnName() + "=");
Expression expression = (Expression) update.getExpressions().get(i);
expression.accept(expressionVisitor);
if (i < update.getColumns().size() - 1) {
buffer.append(", ");
}
}
if (update.getWhere() != null) {
buffer.append(" WHERE ");
update.getWhere().accept(expressionVisitor);
}
}
代码示例来源:origin: alibaba/mdrill
public void deParse(Replace replace) {
buffer.append("REPLACE " + replace.getTable().getWholeTableName());
if (replace.getItemsList() != null) {
if (replace.getColumns() != null) {
buffer.append(" (");
for (int i = 0; i < replace.getColumns().size(); i++) {
Column column = (Column) replace.getColumns().get(i);
buffer.append(column.getWholeColumnName());
if (i < replace.getColumns().size() - 1) {
buffer.append(", ");
}
}
buffer.append(") ");
} else {
buffer.append(" ");
}
} else {
buffer.append(" SET ");
for (int i = 0; i < replace.getColumns().size(); i++) {
Column column = (Column) replace.getColumns().get(i);
buffer.append(column.getWholeColumnName() + "=");
Expression expression = (Expression) replace.getExpressions().get(i);
expression.accept(expressionVisitor);
if (i < replace.getColumns().size() - 1) {
buffer.append(", ");
}
}
}
}
代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat
public String toString() {
return getWholeTableName()+((alias!=null)?" AS "+alias:"");
}
}
代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat
public void visit(Table tableName) {
buffer.append(tableName.getWholeTableName());
String alias = tableName.getAlias();
if (alias != null && !alias.isEmpty()) {
buffer.append(" AS " + alias);
}
}
代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat
public void visit(Column tableColumn) {
String tableName = tableColumn.getTable().getWholeTableName();
if (tableName != null) {
buffer.append(tableName + ".");
}
buffer.append(tableColumn.getColumnName());
}
代码示例来源:origin: com.eas.platypus/platypus-js-datamodel
public static Map<String, FromItem> prepareUniqueTables(Map<String, FromItem> tables) {
Map<String, FromItem> uniqueTables = new HashMap<>();
tables.values().stream().forEach((fromItem) -> {
if (fromItem.getAlias() != null && !fromItem.getAlias().getName().isEmpty()) {
uniqueTables.put(fromItem.getAlias().getName().toLowerCase(), fromItem);
} else if (fromItem instanceof Table) {
uniqueTables.put(((Table) fromItem).getWholeTableName().toLowerCase(), fromItem);
}
});
return uniqueTables;
}
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
@Override
public String toString() {
return (getComment() != null ? getComment() + " " : "") + getWholeTableName() + (alias != null ? " " + alias : "");
}
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
public void visit(Table aTable) {
buffer.append(aTable.getComment() != null ? aTable.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(aTable.getWholeTableName());
String alias = aTable.getAlias() != null ? aTable.getAlias().toString() : "";
if (alias != null && !alias.isEmpty()) {
buffer.append(" ").append(alias);// it's very strange, but in fact oracle doesn't permit as key word if form clause
// buffer.append(" as ").append(alias);
}
}
代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat
public void deParse(Delete delete) {
buffer.append("DELETE FROM " + delete.getTable().getWholeTableName());
if (delete.getWhere() != null) {
buffer.append(" WHERE ");
delete.getWhere().accept(expressionVisitor);
}
}
public ExpressionVisitor getExpressionVisitor() {
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
public void visit(Column tableColumn) {
buffer.append(tableColumn.getComment() != null ? tableColumn.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "");
if (tableColumn.getTable().getName() != null) {
String tableName = tableColumn.getTable().getWholeTableName();
buffer.append(tableName).append(".");
}
buffer.append(tableColumn.getColumnName());
}
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
public void deParse(Truncate truncate) {
buffer.append(truncate.getComment() != null ? truncate.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append("Truncate")
.append(truncate.getCommentTable() != null ? " " + truncate.getCommentTable() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Table ")
.append(truncate.getTable().getComment() != null ? truncate.getTable().getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(truncate.getTable().getWholeTableName());
buffer.append(!"".equals(truncate.getEndComment()) ? " " + truncate.getEndComment() : "");
}
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
public void deParse(Delete aDelete) {
buffer
.append(aDelete.getComment() != null ? aDelete.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "")
.append("Delete").append(aDelete.getFromComment() != null ? " " + aDelete.getFromComment() + ExpressionDeParser.LINE_SEPARATOR : "").append(" From ")
.append(aDelete.getTable().getComment() != null ? aDelete.getTable().getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(aDelete.getTable().getWholeTableName());
if (aDelete.getWhere() != null) {
buffer.append(aDelete.getWhereComment() != null ? " " + aDelete.getWhereComment() : "").append(ExpressionDeParser.LINE_SEPARATOR).append(" Where ");
aDelete.getWhere().accept(expressionVisitor);
}
buffer.append(!"".equals(aDelete.getEndComment()) ? " " + aDelete.getEndComment() : "");
}
内容来源于网络,如有侵权,请联系作者删除!