39 const auto res =
data_.find(name);
40 if (res ==
data_.end())
42 throw std::range_error(
"");
61 data_[name] =
static_cast<int>(val);
65 return doLookup<std::string>(name);
69 return doLookup<double>(name);
73 return doLookup<int>(name);
77 return static_cast<bool>(doLookup<int>(name));
81 return (data_.find(name) != data_.end());
85 std::set<std::string> ans;
86 std::transform(data_.begin(), data_.end(), std::inserter(ans, ans.end()), [](
const auto& it) { return it.first; });
92 switch (sqlite3_column_type(stmt, col))
99 std::string(
reinterpret_cast<const char*
>(sqlite3_column_blob(stmt, col)), sqlite3_column_bytes(stmt, col));
102 data_[name] = sqlite3_column_int(stmt, col);
105 data_[name] = sqlite3_column_double(stmt, col);
115 for (
const auto& kv : data_)
117 boost::apply_visitor(visitor.
setColumnName(std::get<0>(kv)), std::get<1>(kv));