use of org.jkiss.dbeaver.ext.generic.model.GenericTableBase in project dbeaver by serge-rider.
the class GenericViewManager method createDatabaseObject.
@Override
protected GenericTableBase createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, Object container, Object copyFrom, Map<String, Object> options) {
GenericStructContainer structContainer = (GenericStructContainer) container;
String tableName = getNewChildName(monitor, structContainer, SQLTableManager.BASE_VIEW_NAME);
GenericTableBase viewImpl = structContainer.getDataSource().getMetaModel().createTableImpl(structContainer, tableName, GenericConstants.TABLE_TYPE_VIEW, null);
if (viewImpl instanceof GenericView) {
((GenericView) viewImpl).setObjectDefinitionText("CREATE VIEW " + viewImpl.getFullyQualifiedName(DBPEvaluationContext.DDL) + " AS SELECT 1 as A\n");
}
return viewImpl;
}
Aggregations