mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Quality-of-life, add some todos for ideas
This commit is contained in:
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
@ -30,4 +30,5 @@ public enum AuditLevel
|
|||||||
NONE,
|
NONE,
|
||||||
RECORD,
|
RECORD,
|
||||||
FIELD
|
FIELD
|
||||||
|
// idea: only audit changes to fields, e.g., on edit. though, is that a different dimension than this?
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,11 @@ public class BulkLoadValueMapper
|
|||||||
valuesNotFound.add(value);
|
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.setIdList(idList);
|
||||||
searchPossibleValueSourceInput.setLimit(values.size());
|
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)));
|
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)));
|
||||||
|
@ -239,6 +239,10 @@ public class ColumnStatsStep implements BackendStep
|
|||||||
|
|
||||||
QPossibleValueTranslator qPossibleValueTranslator = new QPossibleValueTranslator();
|
QPossibleValueTranslator qPossibleValueTranslator = new QPossibleValueTranslator();
|
||||||
qPossibleValueTranslator.translatePossibleValuesInRecords(table, valueCounts, queryJoin == null ? null : List.of(queryJoin), null);
|
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);
|
QValueFormatter.setDisplayValuesInRecords(table, Map.of(fieldName, field, "count", countField), valueCounts);
|
||||||
|
|
||||||
runBackendStepOutput.addValue("valueCounts", valueCounts);
|
runBackendStepOutput.addValue("valueCounts", valueCounts);
|
||||||
|
@ -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.fields.QFieldMetaData;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
|
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.CollectionUtils;
|
||||||
|
import com.kingsrook.qqq.backend.core.utils.StringUtils;
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
@ -132,6 +133,10 @@ public class RDBMSInsertAction extends AbstractRDBMSAction implements InsertInte
|
|||||||
for(QRecord record : page)
|
for(QRecord record : page)
|
||||||
{
|
{
|
||||||
QRecord outputRecord = new QRecord(record);
|
QRecord outputRecord = new QRecord(record);
|
||||||
|
if(!StringUtils.hasContent(outputRecord.getTableName()))
|
||||||
|
{
|
||||||
|
outputRecord.setTableName(tableName);
|
||||||
|
}
|
||||||
outputRecords.add(outputRecord);
|
outputRecords.add(outputRecord);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -151,6 +156,10 @@ public class RDBMSInsertAction extends AbstractRDBMSAction implements InsertInte
|
|||||||
for(QRecord record : page)
|
for(QRecord record : page)
|
||||||
{
|
{
|
||||||
QRecord outputRecord = new QRecord(record);
|
QRecord outputRecord = new QRecord(record);
|
||||||
|
if(!StringUtils.hasContent(outputRecord.getTableName()))
|
||||||
|
{
|
||||||
|
outputRecord.setTableName(tableName);
|
||||||
|
}
|
||||||
outputRecords.add(outputRecord);
|
outputRecords.add(outputRecord);
|
||||||
|
|
||||||
if(CollectionUtils.nullSafeIsEmpty(record.getErrors()))
|
if(CollectionUtils.nullSafeIsEmpty(record.getErrors()))
|
||||||
|
Reference in New Issue
Block a user