Search in sources :

Example 1 with ExasolView

use of org.jkiss.dbeaver.ext.exasol.model.ExasolView in project dbeaver by serge-rider.

the class ExasolViewManager method addObjectDeleteActions.

@Override
protected void addObjectDeleteActions(List<DBEPersistAction> actions, SQLObjectEditor<ExasolView, ExasolSchema>.ObjectDeleteCommand<ExasolView, ExasolSchema> command) {
    ExasolView view = (ExasolView) command.getObject();
    actions.add(new SQLDatabasePersistAction("Drop view", "DROP VIEW " + view.getFullyQualifiedName(DBPEvaluationContext.DDL)));
}
Also used : ExasolView(org.jkiss.dbeaver.ext.exasol.model.ExasolView) SQLDatabasePersistAction(org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)

Example 2 with ExasolView

use of org.jkiss.dbeaver.ext.exasol.model.ExasolView in project dbeaver by serge-rider.

the class ExasolViewManager method createDatabaseObject.

@Override
protected ExasolView createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, ExasolSchema parent, Object copyFrom) throws DBException {
    ExasolView newView = new ExasolView(parent);
    newView.setName("new_view");
    return newView;
}
Also used : ExasolView(org.jkiss.dbeaver.ext.exasol.model.ExasolView)

Example 3 with ExasolView

use of org.jkiss.dbeaver.ext.exasol.model.ExasolView in project dbeaver by dbeaver.

the class ExasolViewManager method addObjectRenameActions.

@Override
protected void addObjectRenameActions(List<DBEPersistAction> actions, ObjectRenameCommand command, Map<String, Object> options) {
    ExasolView obj = command.getObject();
    actions.add(new SQLDatabasePersistAction("Rename View", "RENAME VIEW " + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getOldName()) + " to " + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getNewName())));
}
Also used : ExasolView(org.jkiss.dbeaver.ext.exasol.model.ExasolView) SQLDatabasePersistAction(org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)

Example 4 with ExasolView

use of org.jkiss.dbeaver.ext.exasol.model.ExasolView in project dbeaver by serge-rider.

the class ExasolViewManager method addObjectRenameActions.

@Override
protected void addObjectRenameActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectRenameCommand command, Map<String, Object> options) {
    ExasolView obj = command.getObject();
    actions.add(new SQLDatabasePersistAction("Rename View", "RENAME VIEW " + DBUtils.getQuotedIdentifier(obj.getSchema()) + "." + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getOldName()) + " to " + DBUtils.getQuotedIdentifier(obj.getDataSource(), command.getNewName())));
}
Also used : ExasolView(org.jkiss.dbeaver.ext.exasol.model.ExasolView) SQLDatabasePersistAction(org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)

Example 5 with ExasolView

use of org.jkiss.dbeaver.ext.exasol.model.ExasolView in project dbeaver by serge-rider.

the class ExasolViewManager method createDatabaseObject.

@Override
protected ExasolView createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, Object container, Object copyFrom, Map<String, Object> options) throws DBException {
    ExasolSchema schema = (ExasolSchema) container;
    ExasolView newView = new ExasolView(schema);
    newView.setName("new_view");
    setNewObjectName(monitor, schema, newView);
    newView.setObjectDefinitionText("CREATE OR REPLACE VIEW " + newView.getFullyQualifiedName(DBPEvaluationContext.DDL) + " AS\nSELECT");
    return newView;
}
Also used : ExasolSchema(org.jkiss.dbeaver.ext.exasol.model.ExasolSchema) ExasolView(org.jkiss.dbeaver.ext.exasol.model.ExasolView)

Aggregations

ExasolView (org.jkiss.dbeaver.ext.exasol.model.ExasolView)11 SQLDatabasePersistAction (org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)5 ExasolSchema (org.jkiss.dbeaver.ext.exasol.model.ExasolSchema)4 HashSet (java.util.HashSet)3 ExasolTable (org.jkiss.dbeaver.ext.exasol.model.ExasolTable)3 ExasolTableBase (org.jkiss.dbeaver.ext.exasol.model.ExasolTableBase)3 VoidProgressMonitor (org.jkiss.dbeaver.model.runtime.VoidProgressMonitor)2