Skip to content

Commit

Permalink
dbeaver/dbeaver-ee#1771 add child types for sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
Destrolaric committed Sep 5, 2022
1 parent 4ad7e42 commit d572031
Showing 1 changed file with 16 additions and 2 deletions.
Expand Up @@ -19,15 +19,18 @@
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.ext.generic.edit.GenericTableManager;
import org.jkiss.dbeaver.ext.generic.model.GenericDataSource;
import org.jkiss.dbeaver.ext.generic.model.GenericTableBase;
import org.jkiss.dbeaver.ext.generic.model.*;
import org.jkiss.dbeaver.ext.sqlite.model.SQLiteTableColumn;
import org.jkiss.dbeaver.ext.sqlite.model.SQLiteTableForeignKey;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.edit.DBEObjectRenamer;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.utils.CommonUtils;

import java.util.List;
import java.util.Map;
Expand All @@ -37,6 +40,17 @@
*/
public class SQLiteTableManager extends GenericTableManager implements DBEObjectRenamer<GenericTableBase> {

private static final Class<? extends DBSObject>[] CHILD_TYPES = CommonUtils.array(
SQLiteTableColumn.class,
SQLiteTableForeignKey.class,
GenericTableIndex.class,
GenericUniqueKey.class
);

@NotNull @Override public Class<? extends DBSObject>[] getChildTypes() {
return CHILD_TYPES;
}

@Override
protected void addObjectRenameActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectRenameCommand command, Map<String, Object> options)
{
Expand Down

0 comments on commit d572031

Please sign in to comment.