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

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

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

Table.setSchemaName介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

  1. qualifiedTable.setSchemaName(qualifiedSchema.toUpperCase());

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

  1. /**
  2. * Add new entries to the table name map.
  3. *
  4. * @param originalName a table name that should be replaced
  5. * @param newName the value that originalName should be replaced with
  6. */
  7. public void put(String originalName, String newName)
  8. {
  9. Table t = new Table();
  10. String[] parts = newName.split("[.]");
  11. if (parts.length == 1) {
  12. t.setName(parts[0]);
  13. } else if (parts.length == 2) {
  14. t.setSchemaName(parts[0]);
  15. t.setName(parts[1]);
  16. } else if (parts.length == 3) {
  17. t.setSchemaName(parts[0] + "." + parts[1]);
  18. t.setName(parts[2]);
  19. }
  20. else
  21. throw new IllegalArgumentException("expected new table name to have 1-3 parts, found " + parts.length);
  22. map.put(originalName, t);
  23. }

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

  1. /**
  2. * Add new entries to the table name map.
  3. *
  4. * @param originalName a table name that should be replaced
  5. * @param newName the value that originalName should be replaced with
  6. */
  7. public void put(String originalName, String newName)
  8. {
  9. Table t = new Table();
  10. String[] parts = newName.split("[.]");
  11. if (parts.length == 1) {
  12. t.setName(parts[0]);
  13. } else if (parts.length == 2) {
  14. t.setSchemaName(parts[0]);
  15. t.setName(parts[1]);
  16. } else if (parts.length == 3) {
  17. t.setSchemaName(parts[0] + "." + parts[1]);
  18. t.setName(parts[2]);
  19. }
  20. else
  21. throw new IllegalArgumentException("expected new table name to have 1-3 parts, found " + parts.length);
  22. map.put(originalName, t);
  23. }

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

  1. @Override
  2. public void visit(Table table)
  3. {
  4. log.debug("visit(table)" + table);
  5. String tabName = table.getWholeTableName();
  6. log.debug("looking for " + tabName + " in conversion map...");
  7. Table ntab = map.get(tabName);
  8. log.debug("found: " + ntab);
  9. if (ntab != null)
  10. {
  11. log.debug("convert: " + table.getSchemaName() + "." + table.getName()
  12. + " -> " + ntab.getSchemaName() + "." + ntab.getName());
  13. table.setName(ntab.getName());
  14. table.setSchemaName(ntab.getSchemaName());
  15. // leave alias intact
  16. }
  17. }
  18. }

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

  1. @Override
  2. public void visit(Column column)
  3. {
  4. log.debug("visit(column)" + column);
  5. Table table = column.getTable();
  6. log.debug("table: " + table);
  7. if (table != null && table.getName() != null)
  8. {
  9. String tabName = table.getWholeTableName();
  10. log.debug("looking for " + tabName + " in conversion map...");
  11. Table ntab = map.get(tabName);
  12. log.debug("found: " + ntab);
  13. if (ntab != null)
  14. {
  15. log.debug("convert: " + table.getSchemaName() + "." + table.getName()
  16. + " -> " + ntab.getSchemaName() + "." + ntab.getName());
  17. table.setName(ntab.getName());
  18. table.setSchemaName(ntab.getSchemaName());
  19. // leave alias intact
  20. }
  21. }
  22. }
  23. }

代码示例来源:origin: org.geotools/gt-arcsde

  1. qualifiedTable.setSchemaName(qualifiedSchema.toUpperCase());

代码示例来源:origin: it.unibz.inf.ontop/ontop-obdalib-core

  1. public static void normalizeColumnName(QuotedIDFactory idfac, Column tableColumn) {
  2. QuotedID columnName = idfac.createAttributeID(tableColumn.getColumnName());
  3. tableColumn.setColumnName(columnName.getSQLRendering());
  4. Table table = tableColumn.getTable();
  5. RelationID tableName = idfac.createRelationID(table.getSchemaName(), table.getName());
  6. table.setSchemaName(tableName.getSchemaSQLRendering());
  7. table.setName(tableName.getTableNameSQLRendering());
  8. }

相关文章