Quality-of-life, add some todos for ideas

This commit is contained in:
2025-02-12 14:21:02 -06:00
parent ab31067e11
commit f0c07caba8
5 changed files with 33 additions and 0 deletions

View File

@ -326,6 +326,20 @@ public class AuditSingleInput implements Serializable
/*******************************************************************************
** Fluent setter for details
*******************************************************************************/
public AuditSingleInput withDetailMessages(List<String> details)
{
for(String detail : details)
{
addDetail(message);
}
return (this);
}
/*******************************************************************************
**
*******************************************************************************/

View File

@ -30,4 +30,5 @@ public enum AuditLevel
NONE,
RECORD,
FIELD
// idea: only audit changes to fields, e.g., on edit. though, is that a different dimension than this?
}

View File

@ -258,6 +258,11 @@ public class BulkLoadValueMapper
valuesNotFound.add(value);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// todo - we should probably be doing a lot of what QJavalinImplementation.finishPossibleValuesRequest does here //
// to apply possible-value filters. difficult to pass values in, but needed... //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
searchPossibleValueSourceInput.setIdList(idList);
searchPossibleValueSourceInput.setLimit(values.size());
LOG.debug("Searching possible value source by ids during bulk load mapping", logPair("pvsName", field.getPossibleValueSourceName()), logPair("noOfIds", idList.size()), logPair("firstId", () -> idList.get(0)));

View File

@ -239,6 +239,10 @@ public class ColumnStatsStep implements BackendStep
QPossibleValueTranslator qPossibleValueTranslator = new QPossibleValueTranslator();
qPossibleValueTranslator.translatePossibleValuesInRecords(table, valueCounts, queryJoin == null ? null : List.of(queryJoin), null);
/////////////////////////////////////////////////////////////////////////////////////////////////
// todo - be aware of possible name collisions here!! (e.g., a table w/ a field named `count`) //
/////////////////////////////////////////////////////////////////////////////////////////////////
QValueFormatter.setDisplayValuesInRecords(table, Map.of(fieldName, field, "count", countField), valueCounts);
runBackendStepOutput.addValue("valueCounts", valueCounts);

View File

@ -37,6 +37,7 @@ import com.kingsrook.qqq.backend.core.model.data.QRecord;
import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData;
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
import com.kingsrook.qqq.backend.core.utils.CollectionUtils;
import com.kingsrook.qqq.backend.core.utils.StringUtils;
/*******************************************************************************
@ -132,6 +133,10 @@ public class RDBMSInsertAction extends AbstractRDBMSAction implements InsertInte
for(QRecord record : page)
{
QRecord outputRecord = new QRecord(record);
if(!StringUtils.hasContent(outputRecord.getTableName()))
{
outputRecord.setTableName(tableName);
}
outputRecords.add(outputRecord);
}
continue;
@ -151,6 +156,10 @@ public class RDBMSInsertAction extends AbstractRDBMSAction implements InsertInte
for(QRecord record : page)
{
QRecord outputRecord = new QRecord(record);
if(!StringUtils.hasContent(outputRecord.getTableName()))
{
outputRecord.setTableName(tableName);
}
outputRecords.add(outputRecord);
if(CollectionUtils.nullSafeIsEmpty(record.getErrors()))