Esempio n. 1
0
    static bool fetch(const row& res, ColOrName col_or_name, std::unique_ptr<T>& v)
    {
        T tmp;
        if (res.fetch(col_or_name, tmp))
            v.reset(new T(std::move(tmp)));

        return true;
    }
Esempio n. 2
0
    static bool fetch(const row& res, ColOrName col_or_name, boost::posix_time::ptime& v)
    {
        std::tm tm_struct;
        bool ret = res.fetch(col_or_name, tm_struct);
        if (ret)
            v = boost::posix_time::ptime_from_tm(tm_struct);

        return ret;
    }