use of org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn in project dbeaver by serge-rider.
the class ExasolTablePartitionColumnCache method getAllObjects.
@Override
public Collection<ExasolTablePartitionColumn> getAllObjects(DBRProgressMonitor monitor, ExasolTable owner) throws DBException {
if (tablePartitionColumns.isEmpty() && !super.fullCache) {
for (ExasolTableColumn col : owner.getAttributes(monitor)) {
if (col.getPartitionKeyOrdinalPosition() != null) {
tablePartitionColumns.add(new ExasolTablePartitionColumn(owner, col, col.getPartitionKeyOrdinalPosition().intValue()));
}
}
sortPartitionColumns();
super.setCache(tablePartitionColumns);
}
return tablePartitionColumns;
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn in project dbeaver by dbeaver.
the class ExasolTablePartitionColumnCache method getAllObjects.
@Override
public Collection<ExasolTablePartitionColumn> getAllObjects(DBRProgressMonitor monitor, ExasolTable owner) throws DBException {
if (tablePartitionColumns.isEmpty() && !super.fullCache) {
for (ExasolTableColumn col : owner.getAttributes(monitor)) {
if (col.getPartitionKeyOrdinalPosition() != null) {
tablePartitionColumns.add(new ExasolTablePartitionColumn(owner, col, col.getPartitionKeyOrdinalPosition().intValue()));
}
}
sortPartitionColumns();
super.setCache(tablePartitionColumns);
}
return tablePartitionColumns;
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn 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);
}
}
use of org.jkiss.dbeaver.ext.exasol.model.ExasolTablePartitionColumn 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);
}
}
Aggregations