Function fieldsSelector

Synopsis

#include <orm_lib/inc/drogon/orm/RestfulController.h>

std::vector< std::string > fieldsSelector(const std::set< std::string > &fields)

Description

No description yet.

Source

Lines 94-109 in orm_lib/inc/drogon/orm/RestfulController.h.

std::vector<std::string> fieldsSelector(const std::set<std::string> &fields)
{
    std::vector<std::string> ret;
    for (auto &field : masqueradingVector_)
    {
        if (!field.empty() && fields.find(field) != fields.end())
        {
            ret.emplace_back(field);
        }
        else
        {
            ret.emplace_back(std::string{});
        }
    }
    return ret;
}





Add Discussion as Guest

Log in to DocsForge