Search in sources :

Example 1 with ExasolTablePartitionColumnCache

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

the class ExasolTablePartitionColumnManager method addObjectDeleteActions.

@Override
protected void addObjectDeleteActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectDeleteCommand command, Map<String, Object> options) {
    ExasolTablePartitionColumn col = command.getObject();
    ExasolTablePartitionColumnCache cache = getObjectsCache(col);
    cache.removeObject(col, false);
    ExasolTable table = command.getObject().getTable();
    try {
        actions.add(new SQLDatabasePersistAction(generateAction(monitor, table)));
    } catch (DBException e) {
        LOG.error("Failed to create Partition Action", e);
    }
}
Also used : DBException(org.jkiss.dbeaver.DBException) ExasolTablePartitionColumn(org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn) ExasolTablePartitionColumnCache(org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTablePartitionColumnCache) ExasolTable(org.jkiss.dbeaver.ext.exasol.model.ExasolTable) SQLDatabasePersistAction(org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)

Example 2 with ExasolTablePartitionColumnCache

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

the class ExasolTablePartitionColumnManager method addObjectDeleteActions.

@Override
protected void addObjectDeleteActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectDeleteCommand command, Map<String, Object> options) {
    ExasolTablePartitionColumn col = command.getObject();
    ExasolTablePartitionColumnCache cache = getObjectsCache(col);
    cache.removeObject(col, false);
    ExasolTable table = command.getObject().getTable();
    try {
        actions.add(new SQLDatabasePersistAction(generateAction(monitor, table)));
    } catch (DBException e) {
        LOG.error("Failed to create Partition Action", e);
    }
}
Also used : DBException(org.jkiss.dbeaver.DBException) ExasolTablePartitionColumn(org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn) ExasolTablePartitionColumnCache(org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTablePartitionColumnCache) ExasolTable(org.jkiss.dbeaver.ext.exasol.model.ExasolTable) SQLDatabasePersistAction(org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)

Aggregations

DBException (org.jkiss.dbeaver.DBException)2 ExasolTable (org.jkiss.dbeaver.ext.exasol.model.ExasolTable)2 ExasolTablePartitionColumn (org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn)2 ExasolTablePartitionColumnCache (org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTablePartitionColumnCache)2 SQLDatabasePersistAction (org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)2