4#include "Stroika/Frameworks/StroikaPreComp.h"
8#include "Stroika/Foundation/Database/SQL/ODBC.h"
13#include "ComputerNetwork.h"
14#include "DirectEmployeesDB.h"
15#include "ORMEmployeesDB.h"
16#include "ThreadTest.h"
22int main ([[maybe_unused]]
int argc, [[maybe_unused]]
const char* argv[])
24 using namespace Stroika::Foundation::Database::SQL;
26 using namespace Stroika::Samples::SQL;
29#if qStroika_HasComponent_sqlite
30 auto connectionFactory = [=] () {
32 return SQLite::Connection::New (SQLite::Connection::Options{.fInMemoryDB = u
"direct-employees-test"});
34 DirectEmployeesDB (connectionFactory);
39#if qStroika_HasComponent_sqlite
41 (void)std::filesystem::remove (dbPath);
42 auto connectionFactory = [=] () {
44 return SQLite::Connection::New (SQLite::Connection::Options{.fDBPath = dbPath});
46 DirectEmployeesDB (connectionFactory);
50#if qStroika_HasComponent_ODBC
55 auto connectionFactory = [=] () {
return ODBC::Connection::New (ODBC::Connection::Options{
"some-dsn"}); };
61#if qStroika_HasComponent_sqlite
63 (void)std::filesystem::remove (dbPath);
64 auto connectionFactory = [=] () {
65 auto conn = SQLite::Connection::New (SQLite::Connection::Options{.fDBPath = dbPath});
68 ThreadTest (connectionFactory);
74#if qStroika_HasComponent_sqlite
76 (void)std::filesystem::remove (dbPath);
77 auto connectionFactory = [=] () {
78 auto conn = SQLite::Connection::New (SQLite::Connection::Options{.fDBPath = dbPath});
81 ORMEmployeesDB (connectionFactory);
86#if qStroika_HasComponent_sqlite
88 (void)std::filesystem::remove (dbPath);
89 auto connectionFactory = [=] () {
return SQLite::Connection::New (SQLite::Connection::Options{.fDBPath = dbPath}); };
90 ComputerNetworksModel (connectionFactory);
filesystem::path GetTemporary()