Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
@@ -4,6 +4,7 @@
|
||||
#include "StructBuilder.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
@@ -294,7 +295,7 @@ bool StructBuilder::handleEnum(const EnumInformation &ei)
|
||||
}
|
||||
|
||||
CompleteTableInformation cti = m_sqlTableInformations[ei.tableName];
|
||||
for (const ColumnInformation &ci : qAsConst(ti->plainColumns))
|
||||
for (const ColumnInformation &ci : std::as_const(ti->plainColumns))
|
||||
{
|
||||
MemberInformation mi;
|
||||
mi.db = FullQualifiedColumnInformation(ci, ei.tableName);
|
||||
@@ -335,7 +336,7 @@ EnumInformation StructBuilder::enumInformationByType(const QString &type, bool c
|
||||
return m_xmlReader->getExternalEnumeration(extInfo.service, extInfo.type, verbose);
|
||||
}
|
||||
|
||||
for (const EnumInformation &ei : qAsConst(m_enumInfos))
|
||||
for (const EnumInformation &ei : std::as_const(m_enumInfos))
|
||||
{
|
||||
if (ei.enumName == type)
|
||||
return ei;
|
||||
@@ -359,7 +360,7 @@ CompleteTopicTypeInformation StructBuilder::topicTypeInformationByStructType(con
|
||||
|
||||
return externalTopicTypeByStructType(extInfo);
|
||||
}
|
||||
for (const CompleteTopicTypeInformation &csi : qAsConst(m_topicTypeInfos))
|
||||
for (const CompleteTopicTypeInformation &csi : std::as_const(m_topicTypeInfos))
|
||||
{
|
||||
if (csi.name == type)
|
||||
return csi;
|
||||
@@ -385,7 +386,7 @@ CompleteTopicTypeInformation StructBuilder::externalTopicTypeByStructType(const
|
||||
{
|
||||
const QString typeToSearch = sts.fqType();
|
||||
DEBUG_LOG(m_logger) << "externalTopicTypeByStructType " << typeToSearch;
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(m_externalTopicTypes))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(m_externalTopicTypes))
|
||||
{
|
||||
if (ctti.name == typeToSearch)
|
||||
return ctti;
|
||||
@@ -427,7 +428,7 @@ bool StructBuilder::getColumnsFromTable(const QString &tableName,
|
||||
const QSharedPointer<TableInformation> ti = m_xmlReader->getTable(tableName);
|
||||
QVector<ConstraintInformation> constraints;
|
||||
constraints.reserve(ti->constraints.size());
|
||||
for (const ConstraintInformation &ci : qAsConst(ti->constraints))
|
||||
for (const ConstraintInformation &ci : std::as_const(ti->constraints))
|
||||
{
|
||||
if (ci.affectedColumns.size() != 1)
|
||||
continue;
|
||||
@@ -437,7 +438,7 @@ bool StructBuilder::getColumnsFromTable(const QString &tableName,
|
||||
}
|
||||
|
||||
columns.reserve(columns.size() + ti->plainColumns.size());
|
||||
for (const auto &plainColum : qAsConst(ti->plainColumns))
|
||||
for (const auto &plainColum : std::as_const(ti->plainColumns))
|
||||
{
|
||||
ColumnInformationEx cie(ColumnInformationEx(plainColum, ti));
|
||||
for (int j = 0; j < constraints.size(); ++j)
|
||||
@@ -466,7 +467,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
csi.hasStaticContent = ssi.hasStaticContent;
|
||||
csi.dbNotifications = ssi.dbNotifications;
|
||||
|
||||
DEBUG_LOG(m_loggerCSV) << "primaryTable: " << csi.primaryTable;
|
||||
DEBUG_LOG(m_loggerCSV) << "primaryTable: " << csi.primaryTable.data();
|
||||
DEBUG_LOG(m_loggerCSV) << "hasStaticContent: " << csi.hasStaticContent;
|
||||
|
||||
|
||||
@@ -486,7 +487,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
|
||||
csi.member.reserve(columns.size() + 1);
|
||||
MemberInformation miPkFirstTable, miPkLastTable;
|
||||
for (const ColumnInformationEx &ci : qAsConst(columns))
|
||||
for (const ColumnInformationEx &ci : std::as_const(columns))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "handling column " << ci.columnName;
|
||||
|
||||
@@ -494,7 +495,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (ti.isNull())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find table for column " << ci.columnName
|
||||
<< " primary table is " << ssi.primaryTable;
|
||||
<< " primary table is " << ssi.primaryTable.data();
|
||||
return false;
|
||||
}
|
||||
csi.tables += ti;
|
||||
@@ -528,7 +529,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (!fki.isNull())
|
||||
{
|
||||
|
||||
for(const auto &tbl : qAsConst(csi.tables))
|
||||
for(const auto &tbl : std::as_const(csi.tables))
|
||||
{
|
||||
if (tbl->name == fki->destination.tableName)
|
||||
{
|
||||
@@ -545,7 +546,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (fki->destination.service.isEmpty())
|
||||
{
|
||||
|
||||
for (const EnumInformation &ei : qAsConst(m_enumInfos))
|
||||
for (const EnumInformation &ei : std::as_const(m_enumInfos))
|
||||
{
|
||||
if (ei.tableName == fki->destination.tableName)
|
||||
{
|
||||
@@ -658,7 +659,7 @@ bool StructBuilder::handleIdlStructInfo(const TopicTypeInformation &tti,
|
||||
const QString &svcName)
|
||||
{
|
||||
|
||||
for (const CompleteTopicTypeInformation &c : qAsConst(destination))
|
||||
for (const CompleteTopicTypeInformation &c : std::as_const(destination))
|
||||
{
|
||||
if (c.name == tti.name)
|
||||
return true;
|
||||
@@ -1285,7 +1286,7 @@ CompleteTableInformation StructBuilder::getRecordingTopicTable(const QString &st
|
||||
{
|
||||
const auto vec = structName.contains(QLatin1String("::")) ? m_externalTopicTypes : m_topicTypeInfos;
|
||||
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(vec))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(vec))
|
||||
{
|
||||
if (structName != ctti.name)
|
||||
continue;
|
||||
@@ -1311,7 +1312,7 @@ QMap<QString, CompleteTableInformation> StructBuilder::getRecordingTopicTables()
|
||||
|
||||
MemberInformation miPrimaryKey(getRecordPrimaryKey());
|
||||
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(m_topicTypeInfos))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(m_topicTypeInfos))
|
||||
{
|
||||
if (!ctti.recordTopic)
|
||||
continue;
|
||||
@@ -1331,7 +1332,7 @@ QMap<QString, CompleteTableInformation> StructBuilder::getRecordingTopicTables()
|
||||
void StructBuilder::addToSerializeFromToJsonTopics(const QSharedPointer<DataTypeInfo> &toAdd)
|
||||
{
|
||||
typedef QSharedPointer<DataTypeInfo> sDTI;
|
||||
for (const sDTI &dti : qAsConst(m_serializeFromToJsonTopics))
|
||||
for (const sDTI &dti : std::as_const(m_serializeFromToJsonTopics))
|
||||
{
|
||||
if (dti->cppType() == toAdd->cppType())
|
||||
return;
|
||||
@@ -1392,9 +1393,9 @@ QString StructBuilder::camelCaseToUnderline(const QString &in)
|
||||
|
||||
StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypename(const QString &type)
|
||||
{
|
||||
const QVector<QStringRef> sl = type.splitRef(QStringLiteral("::"));
|
||||
QStringRef extServiceRef;;
|
||||
QStringRef extTypeRef;
|
||||
const QStringList sl = QString(type).split(QStringLiteral("::"));
|
||||
QStringView extServiceRef;
|
||||
QStringView extTypeRef;
|
||||
if (sl.size() == 1)
|
||||
extTypeRef = sl.at(0);
|
||||
else if (sl.size() == 2)
|
||||
@@ -1407,19 +1408,17 @@ StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypenam
|
||||
StructBuilder::ServiceTypeStruct ret;
|
||||
if (!extServiceRef.isEmpty())
|
||||
{
|
||||
|
||||
if (extServiceRef.contains(QLatin1Char('<')))
|
||||
ret.service = extServiceRef.split(QLatin1Char('<')).at(1).toString();
|
||||
ret.service = QString(extServiceRef).split(QLatin1Char('<')).at(1);
|
||||
else
|
||||
ret.service = extServiceRef.toString();
|
||||
ret.service = QString(extServiceRef);
|
||||
}
|
||||
if (!extTypeRef.isEmpty())
|
||||
{
|
||||
|
||||
if (extTypeRef.contains(QLatin1Char('>')))
|
||||
ret.type = extTypeRef.split(QLatin1Char('>')).at(0).toString();
|
||||
ret.type = QString(extTypeRef).split(QLatin1Char('>')).at(0);
|
||||
else
|
||||
ret.type = extTypeRef.toString();
|
||||
ret.type = QString(extTypeRef);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user