org.teiid.metadata.Table.removeColumn()方法的使用及代码示例

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

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

Table.removeColumn介绍

暂无

代码示例

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

  1. public void removeColumn(String objectName, Database.ResourceType type, String childName) {
  2. if (!assertInEditMode(Mode.SCHEMA)) {
  3. return;
  4. }
  5. Table table = (Table)getSchemaRecord(objectName, type);
  6. assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  7. Column column = table.getColumnByName(childName);
  8. if (column == null) {
  9. throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
  10. QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));
  11. }
  12. table.removeColumn(column);
  13. }

代码示例来源:origin: org.teiid/teiid-engine

  1. public void removeColumn(String objectName, Database.ResourceType type, String childName) {
  2. if (!assertInEditMode(Mode.SCHEMA)) {
  3. return;
  4. }
  5. Table table = (Table)getSchemaRecord(objectName, type);
  6. assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  7. Column column = table.getColumnByName(childName);
  8. if (column == null) {
  9. throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
  10. QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));
  11. }
  12. table.removeColumn(column);
  13. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. final public void alterDropColumn(String objectName, Database.ResourceType type, DatabaseStore dbStore) throws ParseException {
  2. MetadataFactory factory = null;
  3. Table table = null;
  4. String childName = null;
  5. Column column = null;
  6. jj_consume_token(DROP);
  7. jj_consume_token(COLUMN);
  8. childName = id(null);
  9. factory = DatabaseStore.createMF(dbStore);
  10. table = (Table)dbStore.getSchemaRecord(objectName, type);
  11. column = table.getColumnByName(childName);
  12. if (column == null) {
  13. {if (true) throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
  14. QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));}
  15. }
  16. table.removeColumn(column);
  17. dbStore.tableModified(table);
  18. }

相关文章