That would kind of be dependent on each field wouldn't it? Defining NoNULL
for a db or even a statement handle would default it to "" or 0, but what
about the fields you want to keep NULL. I guess it's a good extra setting
that can be easily implemented on the DBI or the driver level.
Ilya
-----Original Message-----
From: H.Merijn Brand
To: DBI developers
Sent: 06/14/2001 10:15 AM
Subject: Poll
<braindump>
$handle->{NoNULL} = 1; # Disable NULL values
to be implemented in DBI (though implementation in DBD would be easy
too)
if NoNULL is defined, change numerics passed as undef (representing
NULL) as 0,
and (var)char to ""
Possibly to be extended for different types:
$dbh->{NullTypes} = { # Replace NULL with ...
Char => " ", # single space
Number => -1, # value -1
Date => undef, # NULL
:
};
</braindump>
--
H.Merijn Brand Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 626 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/