use of org.jkiss.dbeaver.ext.oracle.model.OracleView in project dbeaver by serge-rider.
the class OracleViewManager method createOrReplaceViewQuery.
private void createOrReplaceViewQuery(List<DBEPersistAction> actions, DBECommandComposite<OracleView, PropertyHandler> command) {
final OracleView view = command.getObject();
boolean hasComment = command.getProperty("comment") != null;
if (!hasComment || command.getProperties().size() > 1) {
actions.add(new SQLDatabasePersistAction("Create view", view.getAdditionalInfo().getText()));
}
if (hasComment) {
actions.add(new SQLDatabasePersistAction("Comment table", "COMMENT ON TABLE " + view.getFullyQualifiedName(DBPEvaluationContext.DDL) + " IS '" + view.getComment() + "'"));
}
}
use of org.jkiss.dbeaver.ext.oracle.model.OracleView in project dbeaver by serge-rider.
the class OracleViewManager method createDatabaseObject.
@Override
protected OracleView createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, OracleSchema parent, Object copyFrom) {
//$NON-NLS-1$
OracleView newView = new OracleView(parent, "NEW_VIEW");
newView.getAdditionalInfo().setText("CREATE OR REPLACE VIEW " + newView.getFullyQualifiedName(DBPEvaluationContext.DDL) + " AS\nSELECT");
return newView;
}
Aggregations