#include #include #include #include using namespace std; struct VID { int64_t Vid; int64_t vlen; string sid; int64_t level; XPACK(A(Vid, "db:vid"), O(vlen, sid, level)); }; typedef char cfgstr[64]; struct config { cfgstr host; uint32_t port; cfgstr user; cfgstr password; cfgstr dbname; XPACK(M(host, port, user, password, dbname)) }; int main(int argc, char **argv) { MYSQL *mysql = NULL; if (mysql_library_init(argc, argv, NULL)) { cout<<"could not initialize MySQL client library"< vids; xpack::mysql::decode(result, vids);// decode all rows vector ids; xpack::mysql::decode(result, "vid", ids); // decode vid column of all rows int64_t id; xpack::mysql::decode(result, "vid", id); // decode vid column of first row cout<