Re: libpq++
От | Carlos Moreno |
---|---|
Тема | Re: libpq++ |
Дата | |
Msg-id | 200105091515.AA58851606@mochima.com обсуждение исходный текст |
Ответ на | libpq++ ("J. T. Vermeulen" <jtv@cistron-office.nl>) |
Ответы |
Re: libpq++
|
Список | pgsql-interfaces |
>> - provide STL-conformant interfaces for iterating over result sets; >> - allow fields to be accessed in a type-safe manner; This would be beautiful! I can picture myself having fun writing code like this: conn.Exec ("select ....."); copy (conn.tuples().begin(), conn.tuples().end(), ostream_iterator<tuple> (cout, "\n")); (or even conn.begin(), conn.end()) or: void custom_print_row (const tuple & row) { cout << "ID: " << row["ID"] << endl << "Name: " << row["name"] << endl << "Age: " << current_year() -row["year_born"] << endl << endl; } for_each (conn.begin(), conn.end(), custom_print_row); Things like that... Definitely nice! Carlos --
В списке pgsql-interfaces по дате отправления: