diff --git a/CMake/sqlite3.cmake b/CMake/sqlite3.cmake new file mode 100644 index 0000000..3e4a764 --- /dev/null +++ b/CMake/sqlite3.cmake @@ -0,0 +1,28 @@ +include(FetchContent) + +FetchContent_Declare( + sqlite3 + URL https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip + DOWNLOAD_EXTRACT_TIMESTAMP TRUE +) + +FetchContent_MakeAvailable( + sqlite3 +) + +add_library( + sqlite3 + STATIC +) + +target_include_directories( + sqlite3 + PUBLIC + ${sqlite3_SOURCE_DIR} +) + +target_sources( + sqlite3 + PRIVATE + ${sqlite3_SOURCE_DIR}/sqlite3.c +) diff --git a/Garbage/Include/Garbage/SQLite.hpp b/Garbage/Include/Garbage/SQLite.hpp new file mode 100644 index 0000000..21ea199 --- /dev/null +++ b/Garbage/Include/Garbage/SQLite.hpp @@ -0,0 +1,742 @@ +#ifndef GARBAGE_SQLITE_HPP +#define GARBAGE_SQLITE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Garbage::SQLite +{ + ////////////////////////////////////////////////////////////////////////// + // TRAIT SUPPORT + + template + struct MemberTraits; + + template + struct MemberTraits + { + using Member = T; + using Container = U; + }; + + namespace Implementation + { + template + struct First; + + template + struct First + { + using Type = T; + }; + } + + template + using First = Implementation::First::Type; + + namespace Implementation + { + template