perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: null values
Date Mon, 16 Sep 2002 04:00:26 GMT


> To my surprise, DBIx::Recordset turns null values into undefined hash
values
> when fetching with a Search.

That's what DBI does...

> I'd expect them to be defined but empty.

How would you distinguish between a NULL and an empty string. Ok, some
Oracle versions don't make a difference for these two at all, but there are
other databases as well :-)

>
> Something like !IgnoreEmpty, except this works (according to perldoc) from
> hash to database. I'd like to find a setting so it works the other wayt
too.
>

There is no such setting yet. You can make a loop like
*set = DBIx::Recordset -> Search (....
foreach my $n (@{$set -> Names})
    {
    $rec = defined($set{$n)?$set($n):'' ;
    }

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message