提交 c938baa5 编写于 作者: A Andrew Khitrin

Queries for grouping


Former-commit-id: 57750c4e
上级 950b24b0
......@@ -331,6 +331,10 @@ meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTableReal.rowCountEstimate.na
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTableReal.rowCountEstimate.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTableReal.diskSpace.name=Disk Space
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTableReal.diskSpace.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTablePartition.partKeys.name=Partition Keys
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTablePartition.partKeys.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTablespace.name.name=Name
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTablespace.name.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreTablespace.options.name=Options
......
......@@ -51,7 +51,7 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
private static final Log log = Log.getLog(PostgreTable.class);
private SimpleObjectCache<PostgreTable, PostgreTableForeignKey> foreignKeys = new SimpleObjectCache<>();
private List<PostgreTableBase> partitions = null;
private List<PostgreTablePartition> partitions = null;
private List<PostgreTableBase> children = null;
private boolean hasOids;
......@@ -288,7 +288,7 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
for(PostgreTableBase t : getSchema().tableCache.getCachedObjects())
{
if (t.isParentOf(this.getObjectId()) && t.isPartition()) {
partitions.add(t);
partitions.add(new PostgreTablePartition(t.getContainer(),t,t.isPersisted()));
}
}
}
......
......@@ -17,20 +17,37 @@
*/
package org.jkiss.dbeaver.ext.postgresql.model;
import java.util.List;
import java.sql.ResultSet;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityAssociation;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraint;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraintType;
import org.jkiss.dbeaver.model.struct.DBSEntity;
public class PostgreTablePartition extends PostgreTableConstraintBase implements DBSEntityAssociation
public class PostgreTablePartition extends PostgreTable
{
public static final String CAT_PARTITIONING = "Partitioning";
public PostgreTablePartition(PostgreSchema catalog) {
super(catalog);
}
public PostgreTablePartition(PostgreSchema catalog, ResultSet dbResult) {
super(catalog, dbResult);
}
public PostgreTablePartition(PostgreSchema container, DBSEntity source, boolean persisted) {
super(container, source, persisted);
}
@Property(category = CAT_PARTITIONING, editable = false, viewable = true, order = 50)
public String getPartKeys() {
return "this.oid";
}
/*
private final PostgreTableBase partitionTable;
private int sequenceNum;
//select * from pg_partitioned_table where partrelid = ?
......@@ -75,4 +92,5 @@ public class PostgreTablePartition extends PostgreTableConstraintBase implements
void cacheAttributes(DBRProgressMonitor monitor, List<? extends PostgreTableConstraintColumn> children, boolean secondPass) {
}
*/
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册