use xmake to build project

This commit is contained in:
jie
2024-11-22 16:31:33 +08:00
parent 100e689d1b
commit 31266b363e
8 changed files with 86 additions and 1 deletions

21
src/main.cc Normal file
View 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;
}