diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-08-29 22:17:14 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-08-29 22:17:27 +0200 |
commit | 6379fe9ca2cad3d0c9d886e7808b1d579ce349c2 (patch) | |
tree | f0b86c5c64476ace6a02bca6586047df0dae4196 /modules/codec-sql/c++/sql.hpp | |
parent | 153f808a0eb648a28a2203a96a5d68f9245e361b (diff) |
Not even sure why I have this
Diffstat (limited to 'modules/codec-sql/c++/sql.hpp')
-rw-r--r-- | modules/codec-sql/c++/sql.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/codec-sql/c++/sql.hpp b/modules/codec-sql/c++/sql.hpp new file mode 100644 index 0000000..5f4f3d3 --- /dev/null +++ b/modules/codec-sql/c++/sql.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include <forstio/codec/data.hpp> +#include <sqlite3.h> + +namespace saw { +namespace encode { +struct Sql {}; +} +} + +namespace saw{ +template<typename Schema> +class data<Schema, encode::Sql> { +private: + data<Schema> int_; +public: + data(const data<Schema>& int__):int_{int__}{} + data(data<Schema>&& int__):int_{std::move(int__)}{} +}; + +template<typename Schema> +class codec<Schema, encode::Sql> { +private: + template<typename ToEncode> + error_or<void> decode(data<Schema,encode::Sql>& from, data<Schema, ToEncode>& to){ + return make_error<err::not_implemented>("SQL decode not available"); + } + + template<typename FromEncode> + error_or<void> encode(data<Schema,FromEncode>& from, data<Schema, encode::Sql>& to){ + return make_error<err::not_implemented>("SQL encode not available"); + } +}; +} |