net.sf.jsqlparser.schema.Table.getWholeTableName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中net.sf.jsqlparser.schema.Table.getWholeTableName()方法的一些代码示例,展示了Table.getWholeTableName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getWholeTableName()方法的具体详情如下:
包路径:net.sf.jsqlparser.schema.Table
类名称:Table
方法名:getWholeTableName

Table.getWholeTableName介绍

暂无

代码示例

代码示例来源:origin: alibaba/mdrill

  1. public String toString() {
  2. return getWholeTableName()+((alias!=null)?" AS "+alias:"");
  3. }
  4. }

代码示例来源:origin: alibaba/mdrill

  1. /**
  2. * @return the name of the column, prefixed with 'tableName' and '.'
  3. */
  4. public String getWholeColumnName() {
  5. String columnWholeName = null;
  6. String tableWholeName = table.getWholeTableName();
  7. if (tableWholeName != null && tableWholeName.length() != 0) {
  8. columnWholeName = tableWholeName + "." + columnName;
  9. } else {
  10. columnWholeName = columnName;
  11. }
  12. return columnWholeName;
  13. }

代码示例来源:origin: alibaba/mdrill

  1. public void visit(Table tableName) {
  2. buffer.append(tableName.getWholeTableName());
  3. String alias = tableName.getAlias();
  4. if (alias != null && !alias.equals("")) {
  5. buffer.append(" AS " + alias);
  6. }
  7. }

代码示例来源:origin: alibaba/mdrill

  1. public void visit(AllTableColumns allTableColumns) {
  2. buffer.append(allTableColumns.getTable().getWholeTableName() + ".*");
  3. }

代码示例来源:origin: alibaba/mdrill

  1. public void visit(Column tableColumn) {
  2. String tableName = tableColumn.getTable().getWholeTableName();
  3. if (tableName != null) {
  4. buffer.append(tableName + ".");
  5. }
  6. buffer.append(tableColumn.getColumnName());
  7. }

代码示例来源:origin: alibaba/mdrill

  1. public void deParse(Insert insert) {
  2. buffer.append("INSERT INTO ");
  3. buffer.append(insert.getTable().getWholeTableName());
  4. if (insert.getColumns() != null) {
  5. buffer.append("(");
  6. for (Iterator iter = insert.getColumns().iterator(); iter.hasNext();) {
  7. Column column = (Column) iter.next();
  8. buffer.append(column.getColumnName());
  9. if (iter.hasNext()) {
  10. buffer.append(", ");
  11. }
  12. }
  13. buffer.append(")");
  14. }
  15. insert.getItemsList().accept(this);
  16. }

代码示例来源:origin: alibaba/mdrill

  1. public void deParse(Delete delete) {
  2. buffer.append("DELETE FROM " + delete.getTable().getWholeTableName());
  3. if (delete.getWhere() != null) {
  4. buffer.append(" WHERE ");
  5. delete.getWhere().accept(expressionVisitor);
  6. }
  7. }
  8. public ExpressionVisitor getExpressionVisitor() {

代码示例来源:origin: alibaba/mdrill

  1. public void deParse(CreateTable createTable) {
  2. buffer.append("CREATE TABLE " + createTable.getTable().getWholeTableName());
  3. if (createTable.getColumnDefinitions() != null) {
  4. buffer.append(" { ");

代码示例来源:origin: alibaba/mdrill

  1. public void deParse(Update update) {
  2. buffer.append("UPDATE " + update.getTable().getWholeTableName() + " SET ");
  3. for (int i = 0; i < update.getColumns().size(); i++) {
  4. Column column = (Column) update.getColumns().get(i);
  5. buffer.append(column.getWholeColumnName() + "=");
  6. Expression expression = (Expression) update.getExpressions().get(i);
  7. expression.accept(expressionVisitor);
  8. if (i < update.getColumns().size() - 1) {
  9. buffer.append(", ");
  10. }
  11. }
  12. if (update.getWhere() != null) {
  13. buffer.append(" WHERE ");
  14. update.getWhere().accept(expressionVisitor);
  15. }
  16. }

代码示例来源:origin: alibaba/mdrill

  1. public void deParse(Replace replace) {
  2. buffer.append("REPLACE " + replace.getTable().getWholeTableName());
  3. if (replace.getItemsList() != null) {
  4. if (replace.getColumns() != null) {
  5. buffer.append(" (");
  6. for (int i = 0; i < replace.getColumns().size(); i++) {
  7. Column column = (Column) replace.getColumns().get(i);
  8. buffer.append(column.getWholeColumnName());
  9. if (i < replace.getColumns().size() - 1) {
  10. buffer.append(", ");
  11. }
  12. }
  13. buffer.append(") ");
  14. } else {
  15. buffer.append(" ");
  16. }
  17. } else {
  18. buffer.append(" SET ");
  19. for (int i = 0; i < replace.getColumns().size(); i++) {
  20. Column column = (Column) replace.getColumns().get(i);
  21. buffer.append(column.getWholeColumnName() + "=");
  22. Expression expression = (Expression) replace.getExpressions().get(i);
  23. expression.accept(expressionVisitor);
  24. if (i < replace.getColumns().size() - 1) {
  25. buffer.append(", ");
  26. }
  27. }
  28. }
  29. }

代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat

  1. public String toString() {
  2. return getWholeTableName()+((alias!=null)?" AS "+alias:"");
  3. }
  4. }

代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat

  1. public void visit(Table tableName) {
  2. buffer.append(tableName.getWholeTableName());
  3. String alias = tableName.getAlias();
  4. if (alias != null && !alias.isEmpty()) {
  5. buffer.append(" AS " + alias);
  6. }
  7. }

代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat

  1. public void visit(Column tableColumn) {
  2. String tableName = tableColumn.getTable().getWholeTableName();
  3. if (tableName != null) {
  4. buffer.append(tableName + ".");
  5. }
  6. buffer.append(tableColumn.getColumnName());
  7. }

代码示例来源:origin: com.eas.platypus/platypus-js-datamodel

  1. public static Map<String, FromItem> prepareUniqueTables(Map<String, FromItem> tables) {
  2. Map<String, FromItem> uniqueTables = new HashMap<>();
  3. tables.values().stream().forEach((fromItem) -> {
  4. if (fromItem.getAlias() != null && !fromItem.getAlias().getName().isEmpty()) {
  5. uniqueTables.put(fromItem.getAlias().getName().toLowerCase(), fromItem);
  6. } else if (fromItem instanceof Table) {
  7. uniqueTables.put(((Table) fromItem).getWholeTableName().toLowerCase(), fromItem);
  8. }
  9. });
  10. return uniqueTables;
  11. }

代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser

  1. @Override
  2. public String toString() {
  3. return (getComment() != null ? getComment() + " " : "") + getWholeTableName() + (alias != null ? " " + alias : "");
  4. }

代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser

  1. public void visit(Table aTable) {
  2. buffer.append(aTable.getComment() != null ? aTable.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(aTable.getWholeTableName());
  3. String alias = aTable.getAlias() != null ? aTable.getAlias().toString() : "";
  4. if (alias != null && !alias.isEmpty()) {
  5. buffer.append(" ").append(alias);// it's very strange, but in fact oracle doesn't permit as key word if form clause
  6. // buffer.append(" as ").append(alias);
  7. }
  8. }

代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat

  1. public void deParse(Delete delete) {
  2. buffer.append("DELETE FROM " + delete.getTable().getWholeTableName());
  3. if (delete.getWhere() != null) {
  4. buffer.append(" WHERE ");
  5. delete.getWhere().accept(expressionVisitor);
  6. }
  7. }
  8. public ExpressionVisitor getExpressionVisitor() {

代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser

  1. public void visit(Column tableColumn) {
  2. buffer.append(tableColumn.getComment() != null ? tableColumn.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "");
  3. if (tableColumn.getTable().getName() != null) {
  4. String tableName = tableColumn.getTable().getWholeTableName();
  5. buffer.append(tableName).append(".");
  6. }
  7. buffer.append(tableColumn.getColumnName());
  8. }

代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser

  1. public void deParse(Truncate truncate) {
  2. buffer.append(truncate.getComment() != null ? truncate.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append("Truncate")
  3. .append(truncate.getCommentTable() != null ? " " + truncate.getCommentTable() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Table ")
  4. .append(truncate.getTable().getComment() != null ? truncate.getTable().getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(truncate.getTable().getWholeTableName());
  5. buffer.append(!"".equals(truncate.getEndComment()) ? " " + truncate.getEndComment() : "");
  6. }

代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser

  1. public void deParse(Delete aDelete) {
  2. buffer
  3. .append(aDelete.getComment() != null ? aDelete.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "")
  4. .append("Delete").append(aDelete.getFromComment() != null ? " " + aDelete.getFromComment() + ExpressionDeParser.LINE_SEPARATOR : "").append(" From ")
  5. .append(aDelete.getTable().getComment() != null ? aDelete.getTable().getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(aDelete.getTable().getWholeTableName());
  6. if (aDelete.getWhere() != null) {
  7. buffer.append(aDelete.getWhereComment() != null ? " " + aDelete.getWhereComment() : "").append(ExpressionDeParser.LINE_SEPARATOR).append(" Where ");
  8. aDelete.getWhere().accept(expressionVisitor);
  9. }
  10. buffer.append(!"".equals(aDelete.getEndComment()) ? " " + aDelete.getEndComment() : "");
  11. }

相关文章