Use explicit types with get_row

Auto types aren't very neat as return values because they move the burden
of knowledge to the reader. Using an explicit, and somewhat
self-explanatory, type makes it easier to assess the code without knowing
the implementation of the type.
This commit is contained in:
Markus Mäkelä
2018-04-12 11:15:44 +03:00
parent b6e421e13b
commit e3b11d866f
4 changed files with 8 additions and 6 deletions

View File

@ -17,7 +17,7 @@ bool query(TestConnections& test)
test.maxscales->connect();
execute_query_silent(test.maxscales->conn_rwsplit[0], "SET @a = 1") == 0;
sleep(5);
auto row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @a");
Row row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @a");
test.maxscales->disconnect();
return row[0] == "1";
}