Re: libpq++

From: Randy Jonasz <rjonasz(at)click2net(dot)com>
To: "J(dot)T(dot)Vermeulen" <jtv(at)cistron-office(dot)nl>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libpq++
Date: 2001-03-08 21:31:19
Message-ID: Pine.BSF.4.30.0103081616250.29576-100000@nietzsche.jaded.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

That's great! I think the current C++ API could be improved by a bottom
up rewrite. This would facilitate a true OOP design and permit code such
as:

pgdatabase db( "coninfo" );

pgresult res = db.query( "sql");

psgresult::iterator row = res.begin();
pgresult::iterator end = res.end();

while( start < end ) {

*row >> var1 >> var2;
//or
var1 = row["colname"];
//or
var1 = row[col];

}

I'd like to see the result container comply with STL standard so results
can be used with the STL algorithms or copied into other containers. I've
talked about this in the past, and agree that lazy conversion of values
into their appropriate types would be of use as well.

what do you think?

Cheers,

Randy

On Thu, 8 Mar 2001, J.T.Vermeulen wrote:

> On Wed, 07 Mar 2001, Randy Jonasz wrote:
>
> > I'm very interested in a total revamp of the C++ API. I'd like to mirror
> > the roguewave dbtools++ api in some ways as well as building a STL
> > compliant interface. Would you be interested in working together on this?
>
> Very. I'm sure they must've done a good job, seeing they have Todd Veldhuys
> (the first to publish C++ expression templates) on board. But provided, of
> course, that libpq++ can remain a reasonably light wrapper around the C
> interface--or at least spend most of its code adapting the C API to the way
> C++ wants things to be done.
>
> First however I'll have to merge the changes from at least the three groups
> of diffs that I have already. But for when the time comes, I'd be delighted
> if you could point me to a brief introduction somewhere that tells me at a
> quick glance what the general ideas behind the RogueWave API is. Oh, did I
> mention I was interested in something short and nutshell-contained? ;-)
>
>
> Jeroen
>
>
>

Randy Jonasz
Software Engineer
Click2net Inc.
Web: http://www.click2net.com
Phone: (905) 271-3550

"You cannot possibly pay a philosopher what he's worth,
but try your best" -- Aristotle

In response to

  • Re: libpq++ at 2001-03-07 23:02:50 from J. T. Vermeulen

Responses

  • Re: libpq++ at 2001-03-11 19:20:10 from J. T. Vermeulen

Browse pgsql-interfaces by date

  From Date Subject
Next Message ivan 2001-03-08 22:04:05 Re: DBD::Pg, bytea type
Previous Message Michael Davis 2001-03-08 19:50:50 RE: No suitable driver, Using Win2000 connecting to Access