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

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

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

Table.removeColumn介绍

暂无

代码示例

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

public void removeColumn(String objectName, Database.ResourceType type, String childName) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  Table table = (Table)getSchemaRecord(objectName, type);
  assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  
  Column column = table.getColumnByName(childName);
  if (column == null) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
      QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));      
  }
  table.removeColumn(column);
}

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

public void removeColumn(String objectName, Database.ResourceType type, String childName) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  Table table = (Table)getSchemaRecord(objectName, type);
  assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  
  Column column = table.getColumnByName(childName);
  if (column == null) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
      QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));      
  }
  table.removeColumn(column);
}

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

final public void alterDropColumn(String objectName, Database.ResourceType type, DatabaseStore dbStore) throws ParseException {
   MetadataFactory factory = null;
   Table table = null;
   String childName = null;
   Column column = null;
 jj_consume_token(DROP);
 jj_consume_token(COLUMN);
 childName = id(null);
       factory = DatabaseStore.createMF(dbStore);
       table = (Table)dbStore.getSchemaRecord(objectName, type);
       column = table.getColumnByName(childName);
       if (column == null) {
           {if (true) throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31223,
       QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31223, childName));}
       }
       table.removeColumn(column);
       dbStore.tableModified(table);
}

相关文章

微信公众号

最新文章

更多