This commit is contained in:
ineed bots 2023-09-11 17:02:57 -06:00
parent a970d02d98
commit 6627aff577

View File

@ -1,16 +1,7 @@
#include <stdinc.hpp> #include <stdinc.hpp>
#include "loader/component_loader.hpp" #include "loader/component_loader.hpp"
#include "scheduler.hpp"
#include "gsc.hpp"
#include <utils/io.hpp>
#include <utils/hook.hpp> #include <utils/hook.hpp>
#include <utils/string.hpp>
#include <utils/http.hpp>
#include <json.hpp>
#include <parser.hpp>
#include <SQLiteCpp/Database.h>
namespace test namespace test
{ {
@ -32,32 +23,6 @@ namespace test
//Disable unknown dvar spam //Disable unknown dvar spam
utils::hook::nop(0x5F04AF, 5); utils::hook::nop(0x5F04AF, 5);
if (utils::io::file_exists("some_file.csv"))
{
std::ifstream f("some_file.csv");
aria::csv::CsvParser parser(f);
for (auto& row : parser)
{
for (auto& field : row)
{
printf("%s", std::format("{} | ", field).c_str());
}
printf("\n");
}
}
{
SQLite::Database db(":memory:", SQLite::OPEN_READWRITE);
db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT, weight INTEGER)");
db.exec("INSERT INTO test VALUES (NULL, \"first\", 3)");
db.exec("INSERT INTO test VALUES (NULL, \"second\", 5)");
db.exec("INSERT INTO test VALUES (NULL, \"third\", 7)");
printf("%s %s %d\n", db.execAndGet("SELECT value FROM test WHERE id=2").getString().c_str(), db.execAndGet("SELECT value FROM test WHERE weight=7").getString().c_str(), db.execAndGet("SELECT weight FROM test WHERE value=\"first\"").getInt());
}
} }
private: private: