
15 Sep
2010
15 Sep
'10
10:31 a.m.
A while back, I did some experiments with prepared statements and boost::function (see http://github.com/purpleKarrot/async-db). Have a look at the mysql example. As I recall, it did work. http://github.com/purpleKarrot/async-db/blob/master/examples/mysql.cpp I currently lack the time to work further on this, but if you concentrate on string generation (which I did not), there might be some interesting combinations. Something like this would be cool: . function<void(int, string, gregorian::date)> insert . = sql::bind(INSERT > INTO > users(id, name, registered), . VALUES(int_, string_, date_)); . insert(1003, "Bob", gregorian::day_clock::local_day()); cheers, Daniel