mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Add a reasonable order-by to all table-based PossibleValueSources defined in QQQ; fix using order-by in SearchPossibleValueSourceAction
This commit is contained in:
@ -244,8 +244,6 @@ public class SearchPossibleValueSourceAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queryFilter.setOrderBys(possibleValueSource.getOrderByFields());
|
|
||||||
|
|
||||||
// todo - skip & limit as params
|
// todo - skip & limit as params
|
||||||
queryFilter.setLimit(250);
|
queryFilter.setLimit(250);
|
||||||
|
|
||||||
@ -257,6 +255,9 @@ public class SearchPossibleValueSourceAction
|
|||||||
input.getDefaultQueryFilter().addSubFilter(queryFilter);
|
input.getDefaultQueryFilter().addSubFilter(queryFilter);
|
||||||
queryFilter = input.getDefaultQueryFilter();
|
queryFilter = input.getDefaultQueryFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryFilter.setOrderBys(possibleValueSource.getOrderByFields());
|
||||||
|
|
||||||
queryInput.setFilter(queryFilter);
|
queryInput.setFilter(queryFilter);
|
||||||
|
|
||||||
QueryOutput queryOutput = new QueryAction().execute(queryInput);
|
QueryOutput queryOutput = new QueryAction().execute(queryInput);
|
||||||
|
@ -116,16 +116,19 @@ public class AuditsMetaDataProvider
|
|||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(TABLE_NAME_AUDIT_TABLE)
|
.withName(TABLE_NAME_AUDIT_TABLE)
|
||||||
.withTableName(TABLE_NAME_AUDIT_TABLE)
|
.withTableName(TABLE_NAME_AUDIT_TABLE)
|
||||||
|
.withOrderByField("name")
|
||||||
);
|
);
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(TABLE_NAME_AUDIT_USER)
|
.withName(TABLE_NAME_AUDIT_USER)
|
||||||
.withTableName(TABLE_NAME_AUDIT_USER)
|
.withTableName(TABLE_NAME_AUDIT_USER)
|
||||||
|
.withOrderByField("name")
|
||||||
);
|
);
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(TABLE_NAME_AUDIT)
|
.withName(TABLE_NAME_AUDIT)
|
||||||
.withTableName(TABLE_NAME_AUDIT)
|
.withTableName(TABLE_NAME_AUDIT)
|
||||||
|
.withOrderByField("id", false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,8 @@ public class QueryStatMetaDataProvider
|
|||||||
return (new QPossibleValueSource()
|
return (new QPossibleValueSource()
|
||||||
.withType(QPossibleValueSourceType.TABLE)
|
.withType(QPossibleValueSourceType.TABLE)
|
||||||
.withName(QueryStat.TABLE_NAME)
|
.withName(QueryStat.TABLE_NAME)
|
||||||
.withTableName(QueryStat.TABLE_NAME));
|
.withTableName(QueryStat.TABLE_NAME))
|
||||||
|
.withOrderByField("id", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,8 @@ public class SavedFiltersMetaDataProvider
|
|||||||
.withName(SavedFilter.TABLE_NAME)
|
.withName(SavedFilter.TABLE_NAME)
|
||||||
.withType(QPossibleValueSourceType.TABLE)
|
.withType(QPossibleValueSourceType.TABLE)
|
||||||
.withTableName(SavedFilter.TABLE_NAME)
|
.withTableName(SavedFilter.TABLE_NAME)
|
||||||
.withValueFormatAndFields(PVSValueFormatAndFields.LABEL_ONLY);
|
.withValueFormatAndFields(PVSValueFormatAndFields.LABEL_ONLY)
|
||||||
|
.withOrderByField("label");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -303,19 +303,24 @@ public class ScriptsMetaDataProvider
|
|||||||
{
|
{
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(Script.TABLE_NAME)
|
.withName(Script.TABLE_NAME)
|
||||||
.withTableName(Script.TABLE_NAME));
|
.withTableName(Script.TABLE_NAME)
|
||||||
|
.withOrderByField("name"));
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(ScriptRevision.TABLE_NAME)
|
.withName(ScriptRevision.TABLE_NAME)
|
||||||
.withTableName(ScriptRevision.TABLE_NAME));
|
.withTableName(ScriptRevision.TABLE_NAME)
|
||||||
|
.withOrderByField("scriptId")
|
||||||
|
.withOrderByField("sequenceNo", false));
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(ScriptType.TABLE_NAME)
|
.withName(ScriptType.TABLE_NAME)
|
||||||
.withTableName(ScriptType.TABLE_NAME));
|
.withTableName(ScriptType.TABLE_NAME)
|
||||||
|
.withOrderByField("name"));
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(ScriptLog.TABLE_NAME)
|
.withName(ScriptLog.TABLE_NAME)
|
||||||
.withTableName(ScriptLog.TABLE_NAME));
|
.withTableName(ScriptLog.TABLE_NAME)
|
||||||
|
.withOrderByField("id", false));
|
||||||
|
|
||||||
instance.addPossibleValueSource(new QPossibleValueSource()
|
instance.addPossibleValueSource(new QPossibleValueSource()
|
||||||
.withName(ScriptTypeFileMode.NAME)
|
.withName(ScriptTypeFileMode.NAME)
|
||||||
|
@ -127,7 +127,8 @@ public class QQQTablesMetaDataProvider
|
|||||||
return (new QPossibleValueSource()
|
return (new QPossibleValueSource()
|
||||||
.withType(QPossibleValueSourceType.TABLE)
|
.withType(QPossibleValueSourceType.TABLE)
|
||||||
.withName(QQQTable.TABLE_NAME)
|
.withName(QQQTable.TABLE_NAME)
|
||||||
.withTableName(QQQTable.TABLE_NAME));
|
.withTableName(QQQTable.TABLE_NAME))
|
||||||
|
.withOrderByField("label");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user