diff --git a/test/app.cc b/test/app.cc index 19e4075..08ec181 100644 --- a/test/app.cc +++ b/test/app.cc @@ -42,18 +42,22 @@ static void Test() conn_info->SetVal("host", a8::XValue("127.0.0.1")); conn_info->SetVal("port", a8::XValue(3306)); conn_info->SetVal("user", a8::XValue("root")); - conn_info->SetVal("passwd", a8::XValue("passwd")); + conn_info->SetVal("passwd", a8::XValue("keji178")); conn_info->SetVal("database", a8::XValue("gamedb1008_6")); f8::DBPool::Instance()->ExecAsyncQuery( *conn_info, - "SELECT 1;", + "SELECT 1 UNION SELECT 2 UNION SELECT 3;", {}, a8::XParams(), [] (a8::XParams& param, const f8::DataSet* data_set) { + for (auto& row : *data_set) { + printf("%s\n", row.at(0).c_str()); + } }, [] (a8::XParams& param, int error_code, const std::string& error_msg) { + printf("error_msg:%s\n", error_msg.c_str()); } , rand());