mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Add explicit log (Rather than NPE) for unknown table name
This commit is contained in:
@ -533,11 +533,17 @@ public class QueryStatManager
|
|||||||
////////////////////////
|
////////////////////////
|
||||||
if(getOutput.getRecord() == null)
|
if(getOutput.getRecord() == null)
|
||||||
{
|
{
|
||||||
|
QTableMetaData tableMetaData = getInstance().qInstance.getTable(tableName);
|
||||||
|
if(tableMetaData == null)
|
||||||
|
{
|
||||||
|
LOG.info("No such table", logPair("tableName", tableName));
|
||||||
|
return (null);
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
// insert the record (into the table, not the cache) //
|
// insert the record (into the table, not the cache) //
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
QTableMetaData tableMetaData = getInstance().qInstance.getTable(tableName);
|
InsertInput insertInput = new InsertInput();
|
||||||
InsertInput insertInput = new InsertInput();
|
|
||||||
insertInput.setTableName(QQQTable.TABLE_NAME);
|
insertInput.setTableName(QQQTable.TABLE_NAME);
|
||||||
insertInput.setRecords(List.of(new QRecord().withValue("name", tableName).withValue("label", tableMetaData.getLabel())));
|
insertInput.setRecords(List.of(new QRecord().withValue("name", tableName).withValue("label", tableMetaData.getLabel())));
|
||||||
InsertOutput insertOutput = new InsertAction().execute(insertInput);
|
InsertOutput insertOutput = new InsertAction().execute(insertInput);
|
||||||
|
Reference in New Issue
Block a user