Changeset: b826274dc5bd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b826274dc5bd Modified Files: clients/mapiclient/mclient.c Branch: Jan2014 Log Message:
Less repetition.
diffs (42 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1497,27 +1497,20 @@ format_result(Mapi mid, MapiHdl hdl, cha
timerHumanStop();
aff = mapi_rows_affected(hdl);
lid = mapi_get_last_id(hdl);
+ mnstr_printf(toConsole,
+ LLFMT " affected row%s",
+ aff,
+ "s" + (aff == 1));
if (lid != -1) {
mnstr_printf(toConsole,
- LLFMT " affected row%s, "
- "last generated key: "
- LLFMT "%s%s%s\n",
- aff,
- (aff == 1 ? "" : "s"),
- lid,
- singleinstr ? " (" : "",
- singleinstr && formatter
!= TESTformatter ? timerHuman() : "",
- singleinstr ? ")" : "");
- } else {
- mnstr_printf(toConsole,
- LLFMT " affected row%s"
- "%s%s%s\n",
- aff,
- (aff == 1 ? "" : "s"),
- singleinstr ? " (" : "",
- singleinstr && formatter
!= TESTformatter ? timerHuman() : "",
- singleinstr ? ")" : "");
+ ", last generated key: "
+ LLFMT,
+ lid);
}
+ if (singleinstr && formatter != TESTformatter)
+ mnstr_printf(toConsole, " (%s)",
+ timerHuman());
+ mnstr_printf(toConsole, "\n");
}
continue;
case Q_SCHEMA:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list
