From 8d61f54668bba1a73cc1dc2fe13df625001866a7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 5 Jul 2021 20:27:55 +0100 Subject: Add missing braces --- lib/input/mysqlRecordSet.cpp | 6 ++++-- lib/output/pq/updateDatabase.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/input/mysqlRecordSet.cpp b/lib/input/mysqlRecordSet.cpp index f5d2385..1c2fb07 100644 --- a/lib/input/mysqlRecordSet.cpp +++ b/lib/input/mysqlRecordSet.cpp @@ -54,10 +54,12 @@ namespace MyGrate::Input { case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_BLOB: - if (f.charsetnr == 63) + if (f.charsetnr == 63) { return std::make_unique>(b, f); - else + } + else { return std::make_unique>(b, f); + } case MAX_NO_FIELD_TYPES: case MYSQL_TYPE_BIT: case MYSQL_TYPE_SET: diff --git a/lib/output/pq/updateDatabase.cpp b/lib/output/pq/updateDatabase.cpp index 907ee60..b8e27ba 100644 --- a/lib/output/pq/updateDatabase.cpp +++ b/lib/output/pq/updateDatabase.cpp @@ -79,13 +79,16 @@ namespace MyGrate::Output::Pq { TypeMapper tm; for (auto col : *cols) { output::pq::sql::insertColumn::execute(this, col[0], col.currentRow(), table_id); - if (col.currentRow()) + if (col.currentRow()) { ct << ','; + } scprintf<"%? %?">(ct, col[0], tm.map(col[2], scprintf<"%?.%?">(tableName, col[0]))); - if (!col[1]) + if (!col[1]) { ct << " not null"; - if (col[3]) + } + if (col[3]) { ct << " primary key"; + } tableDef->columns.push_back(std::make_unique(col[0], tableDef->columns.size() + 1, col[3])); } ct << ")"; -- cgit v1.2.3