Simplify code

This commit is contained in:
Martin Kleusberg
2018-09-11 17:13:44 +02:00
parent 918248acaa
commit 2cc900a98e

View File

@@ -143,13 +143,7 @@ QString ForeignKeyClause::toString() const
QString result = escapeIdentifier(m_table);
if(m_columns.size())
{
result += "(";
for(const QString& column : m_columns)
result += escapeIdentifier(column) + ',';
result.chop(1); // Remove last comma
result += ")";
}
result += "(" + escapeIdentifier(m_columns).join(",") + ")";
if(m_constraint.size())
result += " " + m_constraint;