Messy commit. Testing suff and some improvements to how data is shown.
This commit is contained in:
parent
bebb3391c3
commit
3a13b7ffb4
59 changed files with 2045 additions and 716 deletions
|
|
@ -10,7 +10,8 @@ const int c_ColumnEstErr = 3;
|
|||
const int c_ColumnRowCount = 4;
|
||||
const int c_ColumnLoops = 5;
|
||||
const int c_ColumnDetails = 6;
|
||||
const int c_NumberOfColumns = 7;
|
||||
const int c_ColumnShared = 7;
|
||||
const int c_NumberOfColumns = 8;
|
||||
|
||||
QueryExplainModel::QueryExplainModel(QObject *parent, ExplainRoot::SPtr exp)
|
||||
: QAbstractItemModel(parent)
|
||||
|
|
@ -26,7 +27,7 @@ QVariant QueryExplainModel::data(const QModelIndex &index, int role) const
|
|||
if (role == Qt::DisplayRole) {
|
||||
switch (col) {
|
||||
case c_ColumnNode:
|
||||
result = item->nodeType();
|
||||
result = item->nodeType;
|
||||
break;
|
||||
case c_ColumnExclusive:
|
||||
result = item->exclusiveTime();
|
||||
|
|
@ -38,14 +39,17 @@ if (role == Qt::DisplayRole) {
|
|||
result = item->estimateError();
|
||||
break;
|
||||
case c_ColumnRowCount:
|
||||
result = item->actualRows();
|
||||
result = item->actualRows;
|
||||
break;
|
||||
case c_ColumnLoops:
|
||||
result = item->actualLoops();
|
||||
result = item->actualLoops;
|
||||
break;
|
||||
case c_ColumnDetails:
|
||||
result = item->detailString();
|
||||
break;
|
||||
case c_ColumnShared:
|
||||
result = item->sharedBlocks.asString();
|
||||
break;
|
||||
} // end switch column
|
||||
}
|
||||
else if (role == Qt::TextAlignmentRole) {
|
||||
|
|
@ -133,6 +137,9 @@ QVariant QueryExplainModel::headerData(int section, Qt::Orientation orientation,
|
|||
case c_ColumnDetails:
|
||||
v = "Details";
|
||||
break;
|
||||
case c_ColumnShared:
|
||||
v = "Shared";
|
||||
break;
|
||||
}
|
||||
}
|
||||
// else if (role == Qt::SizeHintRole) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue