You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kaare Rasmussen <ka...@kakidata.dk> on 2002/09/14 15:05:42 UTC
null values
To my surprise, DBIx::Recordset turns null values into undefined hash values
when fetching with a Search. I'd expect them to be defined but empty.
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.
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: null values
Posted by Gerald Richter <ri...@ecos.de>.
> 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