diff options
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"); + } +}; +} |