Re: [boost] Interest in an ODBC library?
by Brock Peabody other posts by this author
Aug 18 2005 6:23AM messages near this date
Re: [boost] Interest in an ODBC library?
|
Re: [boost] Interest in an ODBC library?
SOURCE
> -----Original Message-----
> From: boost-bounces@[...].org
[mailto:boost-bounces@[...].org]
> On Behalf Of Jonathan Wakely
> > How do you handle NULL values? the postgresql::row_set_imp::get()
> function
> > doesn't seem to account for NULL, which would crash strlen(), atof()
> etc.
>
> I see from the docs that PQgetvalue() never returns a NULL char*.
Does
> that mean some way of distinguishing empty strings from NULL fields is
> needed? i.e. a wrapper for PQgetisnull.
We could make abstract_row_set::get return an optional<field> instead of
a field. Then row::get_field could return an optional as well.
I'd suggest that row::get, however, continue its current behavior which
is to return a default constructed value in the presence of null fields.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Brian Braatz
Brock Peabody
Caleb Epstein
Brock Peabody
Caleb Epstein
Brock Peabody
Jonathan Wakely
Daryle Walker
Jonathan Wakely
Brock Peabody
Jonathan Wakely
Jonathan Wakely
Brock Peabody
Caleb Epstein
Caleb Epstein
Brock Peabody
Jonathan Wakely
Brock Peabody
|