From: Carlos Moreno <moreno@mochima.com>
To: J. T. Vermeulen <jtv@cistron-office.nl>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq++
Date: Wed, 9 May 2001 15:15:46 -0400
Message-ID: <200105091515.AA58851606@mochima.com> (raw)
>> - 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
--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: moreno@mochima.com, jtv@cistron-office.nl, pgman@candle.pha.pa.us
Subject: Re: libpq++
In-Reply-To: <200105091515.AA58851606@mochima.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox