summaryrefslogtreecommitdiff
path: root/modules/codec-sql/c++/sql.hpp
blob: 5f4f3d31c25a9a0f0bf70e6606a6facca0230c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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");
	}
};
}