Re: libpq++

From: "Carlos Moreno" <moreno(at)mochima(dot)com>
To: "J(dot) T(dot) Vermeulen" <jtv(at)cistron-office(dot)nl>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libpq++
Date: 2001-05-09 19:15:46
Message-ID: 200105091515.AA58851606@mochima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
--

Responses

  • Re: libpq++ at 2001-05-14 13:17:02 from J. T. Vermeulen

Browse pgsql-interfaces by date

  From Date Subject
Next Message Xavier Deheul 2001-05-10 16:24:15 libpgtcl.so
Previous Message Bruce Momjian 2001-05-09 17:53:53 libpq++ FieldSize fix