Skip to content
3 changes: 2 additions & 1 deletion examples/lines_to_sqlitemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class processor
{
using key_type = long long;
using value_type = std::string;
using DB = sm::sqlitemap<decltype(sm::config<key_type, value_type>().codecs())>;
using DB = sm::sqlitemap_t<key_type, value_type>;

public:
processor(const std::string& file, const std::string& table, bool echo = true)
Expand Down Expand Up @@ -77,6 +77,7 @@ class processor
void exit()
{
std::cout << "Existing..." << std::endl;
db.commit();
db.close();
}

Expand Down
10 changes: 5 additions & 5 deletions examples/sqlitemap_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ class tiles
{
using key_type = tile_location;
using value_type = tile_bitmap;
using key_codec_t = sm::codecs::key_codec<key_type, sm::blob>;
using value_codec_t = sm::codecs::value_codec<value_type, sm::blob>;
using db = sm::sqlitemap<sm::codecs::codec_pair<key_codec_t, value_codec_t>>;
using key_codec = sm::key_codec_t<key_type, sm::blob>;
using value_codec = sm::value_codec_t<value_type, sm::blob>;
using db = sm::sqlitemap_t<key_codec, value_codec>;

public:
tiles()
: data(sm::config(key_codec_t{to_blob<key_type>, from_blob<key_type>},
value_codec_t{to_blob<value_type>, from_blob<value_type>})
: data(sm::config(key_codec{to_blob<key_type>, from_blob<key_type>},
value_codec{to_blob<value_type>, from_blob<value_type>})
.log_level(sm::log_level::debug))
{
data.set(tile_location{0, 0, 0}, tile_bitmap{1, 1, 0, 0, //
Expand Down
Loading