Re: [Cppcms-users] Is dbixx::row available in an associative arary?
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2010-12-15 07:25:18
|
On Monday 13 December 2010 05:30:51 pm Artyom wrote: > I'd suggest to take a look on cppdb - this is a new project > drop in replacement of dbixx, unlike dbixx it does not depend on > libdbi library but rather implements all by its own. Its API > is different from dbixx but conversion is mostly mechanical. > > There you can do: > > cppdb::result r = sql << "SELECT name,age,birthday FROM users"; > while(r.next()) { > myClass person = myClass(r.get<std::string>("name"), > r.get<int>("age"), r.get<std::tm>("birthday")); > } Thank you Artyom for the code sample. I'll upgrade to cppdb very soon and try it out. Augustin. -- Friends: http://www.reuniting.info/ http://activistsolutions.org/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |