本文整理了Java中org.teiid.metadata.Table.removeColumn()
方法的一些代码示例,展示了Table.removeColumn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.removeColumn()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!