Ejemplo n.º 1
0
    void operator<<= (cxxtools::SerializationInfo& si, const tntdb::Statement& res)
    {
        si.setTypeName("dbResult");
        si.setCategory(cxxtools::SerializationInfo::Array);

        for (auto cur: res)
            si.addMember() <<= cur;
    }
Ejemplo n.º 2
0
    void operator<<= (cxxtools::SerializationInfo& si, const tntdb::Row& row)
    {
        si.setTypeName("dbRow");

        for (unsigned n = 0; n < row.size(); ++n)
        {
            cxxtools::SerializationInfo& vsi = si.addMember(row.getName(n));

            // leave the new member NULL if the value is null
            std::string value;
            if (row[n].get(value))
                vsi <<= value;
        }
    }