1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include "dbUtils.h" namespace Gentoo { namespace Utils { namespace Database { bool bindOptionalsS(DB::Command * db, unsigned int c, const std::vector<boost::optional<Glib::ustring> > & vs) { for(const auto & v : vs) { if (v) { db->bindParamS(c, *v); return true; } } db->bindNull(c); return false; } } } }