use xmake to build project
This commit is contained in:
21
src/main.cc
Normal file
21
src/main.cc
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "sqlConnection.h"
|
||||
#include <iostream>
|
||||
#include <ranges>
|
||||
namespace ranges = std::ranges;
|
||||
namespace views = std::ranges::views;
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char** const argv){
|
||||
SqlConnection conn{};
|
||||
auto resp = conn.Connect("192.168.1.17", "3306", "root", "", "mobiletek_mmi");
|
||||
// resp.or_else([](auto err_msg){cout<<err_msg<<"\n";});
|
||||
// auto table_result = conn.GetTables();
|
||||
auto result = conn.Query("SELECT IMEI_1 FROM R303 WHERE Powertest=1;");
|
||||
ranges::for_each(result.value(), [](auto row){
|
||||
ranges::for_each(row, [](auto item){
|
||||
cout<<item<<", ";
|
||||
});
|
||||
cout<<endl;
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user