+
Skip to content

Retrieve varidic values from a query #13

@gtnardy

Description

@gtnardy

Hello there @znone!

Is there a way to retrieve variadic values from a query, like in a variant way or even using a map of std::any? My intention is to dynamically iterate through the fields of a query.

For example:

db.query("select 0, 'hello world'", 
    [](const std::unordered_map<std::string, std::any>& record)
    {
         for (const auto& field : record)
             // get the field of any value
    }
 );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载